1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| > > speed=c(4,7,8,9,10,11,12,13,13,14);speed [1] 4 7 8 9 10 11 12 13 13 14 > > speed=c(4,7,8,9,10,11,12,13,13,14);speed [1] 4 7 8 9 10 11 12 13 13 14 > dist=c(2,4,16,10,18,17,24,34,26,26);dist [1] 2 4 16 10 18 17 24 34 26 26 > mean(speed) [1] 10.1 > mean(dist) [1] 17.7 > > sd(speed) [1] 3.142893 > > > min(speed);max(speed) [1] 4 [1] 14 > summary(speed) Min. 1st Qu. Median Mean 3rd Qu. Max. 4.00 8.25 10.50 10.10 12.75 14.00 > plot(speed,dist) > cor(speed,dist) [1] 0.9176971
|