[R] Random Number Testing...

Ko-Kang@xtra.co.nz Ko-Kang at xtra.co.nz
Sun Apr 8 09:48:06 CEST 2001


Suppose I want to test a set of random numbers (using the Binormal random
number generator), input the following command to generate a set of random
     test <- rbinom( 10000000, 1, 0.5 )

How can I, after obtaining the result, export the vector "test" into an text

Then, suppose I want to do something like:
     > x <- 1e10
     > x
     [1] 1e+10
     > test <- rbinom( x, 1, 0.5 )
     Error in rbinom(n, size, prob) : invalid arguments

Why would I get the error message given that x is a number?



Ko-Kang Kevin Wang
Statistical Analysis Division Leader
Software Developers' Klub
University of Auckland
New Zealand

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list