[Rd] Re: [R] Strange means of numbers drawn from rpois (PR#730)
Wed, 8 Nov 2000 18:54:30 +0100 (MET)
On 8 Nov 2000, Peter Dalgaard BSA wrote:
>> > range(sapply(1:2000, function(n) mean(rpois(10000, c(15,15+1e-8)))))
>>  14.8692 15.1200
>AHA! Spotted, I think.
Wow! Great, that was fast!
>It is possible to return from rpois in step N,
>in which case the initialisations in step P are not performed in that
>invokation and not the next times either because it thinks that it has
>been done previously.
Ah, I tried to poke at the code, but got confused rather fast...
>I'm not quite sure what is the best way to fix it, though. Either kill
>muprev when exiting in step N, or make the initialisations currently
>in step P before entering step N. Or maybe save two versions of muprev
>... yes, that might be it - will try.
Great! Thanks, I hope it'll work out. And thanks to all who responded!
Graduate astronomy-student Problems worthy of attack
University of Oslo, Norway Prove their worth by hitting back
E-mail: firstname.lastname@example.org - Piet Hein
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