比如产生随机连续的数据时,常常带很长的小数位,我想限定只保留两位小数,怎么实现呢?
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
[此贴子已经被作者于2008-10-5 4:54:27编辑过]
philzang 发表于 2008-10-5 04:54 You can use options(digits=3)Type it before the generation of the data, and when you want to change back to the default setting, just type options(digits=7). [此贴子已经被作者于2008-10-5 4:54:27编辑过]
元芳十八 发表于 2014-2-16 12:10 在使用round时有一个bug 如:a=dbinom(0:n,n,0.2) 计算得: a=0.16777216 0.33554432 0.29360128 0.14680 ...