> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of cory n
> Sent: Monday, December 20, 2010 11:04 AM
> To: r-help@r-project.org
> Subject: [R] sample() issue
> 
> > length(sample(25000, 25000*(1-.55)))
> [1] 11249
> 
> > 25000*(1-.55)
> [1] 11250
> 
> > length(sample(25000, 11250))
> [1] 11250
> 
> > length(sample(25000, 25000*.45))
> [1] 11250
> 
> So the question is, why do I get 11249 out of the first command and not
> 11250?  I can't figure this one out.
> 
> Thanks
> 
> Cory

See FAQ 7.31

Then try

>.45 == (1-.55)

Hope this is helpful,

Dan


Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to