[R] sample() issue

Petr Savicky savicky at cs.cas.cz
Mon Dec 20 21:20:03 CET 2010


On Mon, Dec 20, 2010 at 01:04:18PM -0600, cory n wrote:
> > length(sample(25000, 25000*(1-.55)))
> [1] 11249
> 
> > 25000*(1-.55)
> [1] 11250

Besides FAQ 7.31, look also at
  http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy
for further examples and hints concerning rounding errors
in simple situations.

Petr Savicky.



More information about the R-help mailing list