numeric(0) -> NA
Wed, 8 Jul 1998 19:55:53 -0500 (CDT)
I noticed this in current intermediate patch version:
I don't like it, but maybe it is the way it is supposed to be. I would
prefer for it to stay numeric(0).
I notice also
which leads me to thing round() is not working right.
I have some code like this:
do.sim<-function(nnoise, nsignal, jump)
#generate noise dots
#generate signal dots
and I need to do do.sim(0,1000,10). But that gives me NAs which are a
problem later. (in particular, I can't do
if rr is computed from an NA.)
BTW I think it is a ghastly waste of resources to do
but I couldn't think of a better way to get ints between 0 and 4095.
(It's a waste because the random number generator makes unsigned long ints
to begin with, then they are divided by 2^32 to get a double between 0
and 1, and now I am undoing that!)
I guess there is sample(,replace=true), which seems even worse for
wasted resources. Maybe not.
Thanks for any help.
r-devel 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: email@example.com