Skip to content

[Rcpp-devel] Setting the R random seed from Rcpp

1 message · William Dunlap

#
This would be easier if base::set.seed() accepted a value of .Random.seed
instead of just a scalar integer or, new to R-3.0.0, NULL.  If set.seed() returned the
previous value of .Random.seed (NULL if there was no previous value) things
might be even easier.  People should not have to know where .Random.seed
is stored.

S+'s set.seed() accepts a value of .Random.seed but does not return the previous value.
(If it is given an illegal value for .Random.seed it complains and sets it to a random value.)

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com