Murtaza Haider — Sep 2, 2013, 3:51 PM
library(Rcmdr)
Loading required package: car Loading required package: MASS Loading
required package: nnet The Commander GUI is launched only in interactive
sessions
library(knitr)
data(Cars93, package="MASS")
numSummary(Cars93[,c("MPG.city", "MPG.highway", "Passengers")],
groups=Cars93$Cylinders, statistics=c("mean", "sd", "IQR", "quantiles"),
quantiles=c(0,.25,.5,.75,1))
Loading required package: abind Loading required package: e1071 Loading
required package: class
Variable: MPG.city
mean sd IQR 0% 25% 50% 75% 100% n
3 39.33 6.5064 6.5 33 36.00 39.0 42.50 46 3
4 24.86 4.1783 6.0 18 22.00 24.0 28.00 42 49
5 18.50 2.1213 1.5 17 17.75 18.5 19.25 20 2
6 18.42 1.4554 1.0 15 18.00 19.0 19.00 21 31
8 17.00 0.8165 1.0 16 16.50 17.0 17.50 18 7
rotary 17.00 NA 0.0 17 17.00 17.0 17.00 17 1
Variable: MPG.highway
mean sd IQR 0% 25% 50% 75% 100% n
3 43.33 6.506 6.5 37 40.00 43.0 46.50 50 3
4 31.45 4.113 4.0 22 29.00 31.0 33.00 46 49
5 24.50 4.950 3.5 21 22.75 24.5 26.25 28 2
6 25.32 2.482 3.5 20 24.00 26.0 27.50 30 31
8 25.00 1.414 1.0 22 25.00 25.0 26.00 26 7
rotary 25.00 NA 0.0 25 25.00 25.0 25.00 25 1
Variable: Passengers
mean sd IQR 0% 25% 50% 75% 100% n
3 4.000 0.0000 0 4 4.0 4 4.0 4 3
4 4.837 0.6876 1 4 4.0 5 5.0 7 49
5 6.000 1.4142 1 5 5.5 6 6.5 7 2
6 5.613 1.0856 1 4 5.0 6 6.0 8 31
8 5.143 1.4639 1 2 5.0 6 6.0 6 7
rotary 2.000 NA 0 2 2.0 2 2.0 2 1
scatterplot(MPG.city~Weight, reg.line=lm, smooth=TRUE, spread=TRUE,
boxplots='xy', span=0.5, data=Cars93)