码迷,mamicode.com
首页 > 其他好文 > 详细

Useful R functions

时间:2015-01-25 08:43:18      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:

Random Samples and Permutations

sample(x, size, replace = FALSE, prob = NULL) 
sample.int(n, size = n, replace = FALSE, prob = NULL)

 

Samples in Normal Distribution

rnorm(n, mean = 0, sd = 1)

 

Generate Factor Levels

gl(n, k, length = n*k, labels = seq_len(n), ordered = FALSE)

 

Useful R functions

标签:

原文地址:http://www.cnblogs.com/nicebear/p/4247727.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!