randu(datasets)
randu()所属R语言包:datasets
Random Numbers from Congruential Generator RANDU
随机数同余发生器RANDU
译者:生物统计家园网 机器人LoveR
描述----------Description----------
400 triples of successive random numbers were taken from the VAX FORTRAN function RANDU running under VMS 1.5.
从VAX Fortran函数运行在VMS 1.5 RANDU 400连续随机数的三倍。
用法----------Usage----------
格式----------Format----------
A data frame with 400 observations on 3 variables named x, y and z which give the first, second and third random number in the triple.
一个有400名为x,y和z给三重第一,第二和第三位的随机数的3个变量的观测数据框。
Details
详情----------Details----------
In three dimensional displays it is evident that the triples fall on 15 parallel planes in 3-space. This can be shown theoretically to be true for all triples from the RANDU generator.
在三维显示器,这是显而易见的三倍下降15个平行平面3空间。这可以证明,理论上是真正的三倍从所有的RANDU发电机。
These particular 400 triples start 5 apart in the sequence, that is they are ((U[5i+1], U[5i+2], U[5i+3]), i= 0, ..., 399), and they are rounded to 6 decimal places.
这些特殊的400三倍启动序列中的第5外,这是他们((美[5I +1],ü[5I +2],ü[5I +3),I = 0,...,399)他们四舍五入到小数点后6位。
Under VMS versions 2.0 and higher, this problem has been fixed.
在VMS 2.0和更高版本中,这个问题已得到修复。
源----------Source----------
David Donoho
大卫Donoho
举例----------Examples----------
## Not run: ## We could re-generate the dataset by the following R code[#不运行:#我们可以重新产生数据集由以下的R代码]
seed <- as.double(1)
RANDU <- function() {
seed <<- ((2^16 + 3) * seed) %% (2^31)
seed/(2^31)
}
for(i in 1:400) {
U <- c(RANDU(), RANDU(), RANDU(), RANDU(), RANDU())
print(round(U[1:3], 6))
}
## End(Not run)[#结束(不运行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|