# https://cran.r-project.org/bin/windows/base/old/3.4.4/
# RFM 분석
# data : subset of UCI data
# 온라인 리테일러 샘플 데이터
# R 데이터분석 scrpt
# 고객세분화 연습용 샘플 데이터
# [서점 CSV]
# 탐색적 데이터 분석 연습용 추가 예제
# Wholesale dataset (UCI machine learning repository)
# https://archive.ics.uci.edu/ml/datasets/wholesale+customers
# import downloaded dataset from local computer
sales <- read.csv("C:/Users/Ebiz01/Downloads/Wholesalecustomersdata.csv")
head(sales)
nrow(sales)
colSums(sales)
barplot(colSums(sales))
plot(sales$Fresh, sales$Milk, pch=19, col=rgb(0,0,1,0.3), cex=0.5)
plot(sales$Fresh, sales$Milk, pch=19, col=rgb(0,0,sales$Channel-1,0.3), cex=0.5)
table(sales$Region)
barplot(table(sales$Region))
plot(sales$Fresh, sales$Milk, pch=17+sales$Region,
col=rgb(0,0,sales$Channel-1,0.3), cex=1)
plot(log(sales$Fresh), log(sales$Milk), pch=17+sales$Region,
col=rgb(0,0,sales$Channel-1,0.3), cex=1)
plot(log(sales$Detergents_Paper), log(sales$Delicassen), pch=17+sales$Region,
col=rgb(0,0,sales$Channel-1,0.3), cex=1)
plot(sales$Detergents_Paper, sales$Delicassen, pch=17+sales$Region,
col=rgb(0,0,sales$Channel-1,0.3), cex=1)
#------ log sales of two categories - by region and channel
'R 데이터 분석' 카테고리의 다른 글
CRMAJU2018] --- R 데이터 처리 기초 연습문제 [1] 후보답안 (0) | 2018.04.12 |
---|---|
[CRMAJU2018] --- R 데이터 처리 기초 연습문제 [1] (0) | 2018.04.06 |
탐색적분석이란? Exploratory Data Analysis (EDA) (0) | 2017.11.24 |
[R분석] randomForest와 ranger 속도 차이 비교 (0) | 2017.11.01 |
[DS_PCBA] 예측적 고객행동 분석 (0) | 2017.10.16 |