随笔分类 -  R语言

摘要:sort与order都是对向量排序,sort返回的是向量排序后的值(小-大),order是对向量排序,然后返回向量的索引(也就是原先所在的第几个位置,默认是1:n的正整数)。 阅读全文
posted @ 2016-10-04 14:18 BelFuture 阅读(514) 评论(0) 推荐(0)
摘要:1 > c barplot(c) 1 > c plot(c) 1 > c barplot(c,horiz = TRUE) 1 > c barplot(c,xlab="Index",ylab = "Improvement", horiz = FALSE) 阅读全文
posted @ 2016-10-04 14:04 BelFuture 阅读(406) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-10-03 13:08 BelFuture 阅读(17238) 评论(0) 推荐(0)
摘要:rnorm()函数产生一系列的随机数,随机数个数,均值和标准差都可以设定。 阅读全文
posted @ 2016-10-03 12:54 BelFuture 阅读(69519) 评论(0) 推荐(2)

The horizon of life is broadened chiefly by the enlargement of the heart.