2 min read

Testje

Zomaar wat…

library(gpairs)
library(corrplot)
## corrplot 0.84 loaded
sat.df <- read.csv("http://goo.gl/HKnl74")
str(sat.df)
## 'data.frame':    500 obs. of  8 variables:
##  $ weekend  : Factor w/ 2 levels "no","yes": 2 2 1 2 1 1 2 1 1 2 ...
##  $ num.child: int  0 2 1 0 4 5 1 0 0 3 ...
##  $ distance : num  114.6 27 63.3 25.9 54.7 ...
##  $ rides    : int  87 87 85 88 84 81 77 82 90 88 ...
##  $ games    : int  73 78 80 72 87 79 73 70 88 86 ...
##  $ wait     : int  60 76 70 66 74 48 58 70 79 55 ...
##  $ clean    : int  89 87 88 89 87 79 85 83 95 88 ...
##  $ overall  : int  47 65 61 37 68 27 40 30 58 36 ...
summary(sat.df)
##  weekend     num.child        distance            rides       
##  no :259   Min.   :0.000   Min.   :  0.5267   Min.   : 72.00  
##  yes:241   1st Qu.:0.000   1st Qu.: 10.3181   1st Qu.: 82.00  
##            Median :2.000   Median : 19.0191   Median : 86.00  
##            Mean   :1.738   Mean   : 31.0475   Mean   : 85.85  
##            3rd Qu.:3.000   3rd Qu.: 39.5821   3rd Qu.: 90.00  
##            Max.   :5.000   Max.   :239.1921   Max.   :100.00  
##      games             wait           clean          overall      
##  Min.   : 57.00   Min.   : 40.0   Min.   : 74.0   Min.   :  6.00  
##  1st Qu.: 73.00   1st Qu.: 62.0   1st Qu.: 84.0   1st Qu.: 40.00  
##  Median : 78.00   Median : 70.0   Median : 88.0   Median : 50.00  
##  Mean   : 78.67   Mean   : 69.9   Mean   : 87.9   Mean   : 51.26  
##  3rd Qu.: 85.00   3rd Qu.: 77.0   3rd Qu.: 91.0   3rd Qu.: 62.00  
##  Max.   :100.00   Max.   :100.0   Max.   :100.0   Max.   :100.00
hist(sat.df$distance)