>age <- c(1,3,5,2,11,9,3,9,12,3)
> weight <- c(4.4,5.3,7.2,5.2,8.5,7.3,6.0,10.4,10.2,6.1)
> mean(age)
[1] 5.8
> mean(weight)
[1] 7.06
> sd(weight)
[1] 2.077498
> cor(age,weight)
[1] 0.9075655
> plot(age,weight)
按<Return>键来看下一个图:
>
R语言练习:婴儿年龄和体重的关系
猜你喜欢
转载自blog.csdn.net/weixin_43476969/article/details/103826732
今日推荐
周排行