Este es un R Markdown Notebook para realizar un análisis exploratorio de datos de la base de datos Carseats del paquete ISLR. Se trabajará principalmente con el paquete dlookr. Fuente: https://cran.r-project.org/web/packages/dlookr/vignettes/EDA.html
library(ISLR)
str(Carseats)
'data.frame': 400 obs. of 11 variables:
$ Sales : num 9.5 11.22 10.06 7.4 4.15 ...
$ CompPrice : num 138 111 113 117 141 124 115 136 132 132 ...
$ Income : num 73 48 35 100 64 113 105 81 110 113 ...
$ Advertising: num 11 16 10 4 3 13 0 15 0 0 ...
$ Population : num 276 260 269 466 340 501 45 425 108 131 ...
$ Price : num 120 83 80 97 128 72 108 120 124 124 ...
$ ShelveLoc : Factor w/ 3 levels "Bad","Good","Medium": 1 2 3 3 1 1 3 2 3 3 ...
$ Age : num 42 65 59 55 38 78 71 67 76 76 ...
$ Education : num 17 10 12 14 13 16 15 10 10 17 ...
$ Urban : Factor w/ 2 levels "No","Yes": 2 2 2 2 2 1 2 2 1 1 ...
$ US : Factor w/ 2 levels "No","Yes": 2 2 2 2 1 2 1 2 1 2 ...
carseats <- ISLR::Carseats
library(dlookr)
describe(carseats)
NA
describe(carseats, -(Sales:Income))
library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
carseats %>%
group_by(US) %>%
describe(Sales, Income)
carseats %>%
group_by(US, Urban) %>%
describe(Sales, Income)
normality(carseats, Sales, CompPrice, Income)