R语言-均值,标准差,相关度
1 > plot(x) 2 > age<-c(1,3,5,2,11,9,3,9,12,3) 3 > weight<-c(4.4,5.3,7.2,5.2,8.5,7.3,6.0,10.4,10.2,6.1) 4 > mean(weight) 5 [1] 7.06 6 > sd(weight) 7 [1] 2.077498 8 > cor(age,weight) 9 [1] 0.9075655 10 > plot(age,weight)
1 > plot(x) 2 > age<-c(1,3,5,2,11,9,3,9,12,3) 3 > weight<-c(4.4,5.3,7.2,5.2,8.5,7.3,6.0,10.4,10.2,6.1) 4 > mean(weight) 5 [1] 7.06 6 > sd(weight) 7 [1] 2.077498 8 > cor(age,weight) 9 [1] 0.9075655 10 > plot(age,weight)