본문 바로가기

데이터분석/R76

[현장에서 바로 써먹는...] 정규분포와 중심극한정리 > ## Chapter4-2. 부화한 병아리들의 체중은 얼마일까? (정규분포와 중심극한정리) > > # ch4-2.csv 파일의 데이터 불러오기 > b head(b) chick_nm weight 1 b01 37 2 b02 39 3 b03 41 4 b04 45 5 b05 37 6 b06 33 > str(b) 'data.frame': 30 obs. of 2 variables: $ chick_nm: chr "b01" "b02" "b03" "b04" ... $ weight : int 37 39 41 45 37 33 34 31 40 41 ... > > # 대략적인 데이터의 분포 확인 > summary(b) chick_nm weight Length:30 Min. :31.00 Class :character 1st Q.. 2022. 4. 2.
[현장에서 바로 써먹는...] 기초통계량 > ### Chapter 4. 통계분석과 기본 그래프 > > ## Chapter4-1. 어제까지 몇 마리의 병아리가 부화했을까? (기초통계량) > > # ch4-1.csv 파일의 데이터 불러오기 > hat hat hatchery chick 1 A 30 2 B 30 3 C 29 4 D 26 5 E 24 6 F 28 7 G 27 > > # 데이터 정렬하기 > hat_asc hat_asc hatchery chick 5 E 24 4 D 26 7 G 27 6 F 28 3 C 29 1 A 30 2 B 30 > > # 간단한 그래프를 그려서 보자 > # 막대그래프 > barplot(hat$chick) > > # 다양한 옵션을 통해 막대그래프 정보를 추가하자 > barplot(hat$chick, names.arg = .. 2022. 4. 2.
ADP Example - 시계열 분석 > # 영국 왕들의 사망시 나이 데이터 > kings kings [1] 60 43 67 50 56 42 50 65 68 43 65 34 47 34 49 41 13 35 53 56 16 43 69 59 48 59 86 55 68 51 33 49 67 77 81 67 71 81 68 70 [41] 77 56 > library(TTR) > library(forecast) > > kingstimeseries kingstimeseries Time Series: Start = 1 End = 42 Frequency = 1 [1] 60 43 67 50 56 42 50 65 68 43 65 34 47 34 49 41 13 35 53 56 16 43 69 59 48 59 86 55 68 51 33 49 67 77 81 6.. 2022. 3. 23.
[실무 프로젝트로 배우는...] 마켓 데이터 분석 > ## 8. 마켓 데이터 분석 > > ### 8.2 데이터 전처리 > > #### 8.2.1 데이터 및 패키지 불러오기 > > library(dplyr) > library(data.table) > library(ggplot2) > library(reshape) > > # 다운로드 URL : https://www.kaggle.com/psparks/instacart-market-basket-analysis > DIR = "F:/1_Study/1_BigData/12_R/02_Practical-R/MarketData/" > LISTFILES = list.files(DIR) > > for(k in 1:length(LISTFILES)) { + assign(gsub(".csv","",LISTFILES[k]), + .. 2022. 2. 8.
[실무 프로젝트로 배우는...] 리뷰 데이터 분석을 통한 감성사전 만들기 > ### 7.2 데이터 전처리 > > #### 7.2.1 데이터 및 패키지 불러오기 > > library(data.table) > library(ggplot2) > library(dplyr) > library(reshape) > > 다운로드 URL : https://www.kaggle.com/datasets/nicapotato/womens-ecommerce-clothing-reviews > DIR = "F:/1_Study/1_BigData/12_R/02_Practical-R/ReviewData/" > Womens = fread(paste0(DIR, "Womens Clothing E-Commerce Reviews.csv")) > str(Womens) Classes ‘data.table’ and 'data.. 2022. 2. 5.
[실무 프로젝트로 배우는...] 마케팅의 RFM 분석 > ### 6.2 데이터 전처리 > > #### 6.2.1 데이터 및 패키지 불러오기 > > library(data.table) > library(ggplot2) > library(dplyr) > library(reshape) > library(ggsci) > > 다운로드 URL : https://www.kaggle.com/mkechinov/ecommerce-events-history-in-cosmetics-shop > DIR = "F:/1_Study/1_BigData/12_R/02_Practical-R/eComData/" > DEC_2019 = fread(paste0(DIR, "2019-Dec.csv")) |--------------------------------------------------| |.. 2022. 2. 2.