Re: [Rd] Bug in rnorm? (PR#12016)

From: <Thierry.ONKELINX_at_inbo.be>
Date: Thu, 07 Aug 2008 12:34:19 +0200 (CEST)

That's not a bug. It's FAQ 7.31

Thierry




ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium=0D
tel. + 32 54/436 185
Thierry.Onkelinx_at_inbo.be=0D
www.inbo.be=0D

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-devel-bounces_at_r-project.org
[mailto:r-devel-bounces_at_r-project.org] Namens paul.eckermann_at_adelaide.edu.au
Verzonden: donderdag 7 augustus 2008 11:33 Aan: r-devel_at_stat.math.ethz.ch
CC: R-bugs_at_biostat.ku.dk
Onderwerp: [Rd] Bug in rnorm? (PR#12016)

Full_Name: Paul Eckermann
Version: 2.7.1
OS: Windows XP Service Pack 2
Submission from: (NULL) (129.127.183.12)

This is the first time I have submitted a bug report, so apologies if I have not
followed the correct protocol.

If I enter

length(rnorm(100*.29))

it returns 28 rather than 29.

y<-(1:100)/100
z<-sapply(y,function(x) length(rnorm(x*100))) z!=3D100*y

indicates that it has something to do with multiples of 7 (rounding error?),
even though 29, 57 and 58 are the 3 values for which it returns incorrect values
of z.

I hope that this is not something obvious that I have missed. This can be
overcome by doing the x*100 calculation outside the rnorm function, but I don't
see why this needs to be done when the answer is (supposed to be) an integer.

Regards,
Paul Eckermann



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver=  weer en bindt het INBO onder geen enkel beding, zolang dit bericht niet=  bevestigd is door een geldig ondertekend document. The views expressed in this message and any annex are purely those of the=  writer and may not be regarded as stating an official position of INBO, as=  long as the message is not confirmed bij a duly signed document



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 07 Aug 2008 - 10:50:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Aug 2008 - 12:36:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive