Professional Documents
Culture Documents
boxplot(mpg)
boxplot(mpg,horizontal = TRUE)
summary(mpg)
cor(hp,mpg)
## [1] -0.7761684
plot(hp,mpg)
plot(hp,mpg,col=c("red","blue"),lwd=4)
plot(hp,mpg,col=c("red","blue"),lwd=3)
plot(hp,mpg,col=c("red","blue"),lwd=2)
cor(disp,mpg)
## [1] -0.8475514
plot(disp,mpg)
plot(disp,mpg,col=c("red","blue"),lwd=4)
mean(mpg);mean(hp);mean(disp)
## [1] 20.09062
## [1] 146.6875
## [1] 230.7219
median(mpg);median(hp);median(disp)
## [1] 19.2
## [1] 123
## [1] 196.3
mode(mpg);mode(hp);mode(disp)
## [1] "numeric"
## [1] "numeric"
## [1] "numeric"