On Fri, Jul 24, 2009 at 9:32 AM, Jan Wiener<jan.wie...@tuebingen.mpg.de> wrote:
> x=sample(1:5, 115, replace=TRUE) > > How do I downsample this vector to 100 entries? Are there any R functions or > packages that provide such functionality. What exactly do you mean by downsampling? Do you just want to sample 100 random entries from x? sample(sample(1:5,115,replace=TRUE),100,replace=FALSE)) -- Michael Knudsen micknud...@gmail.com http://lifeofknudsen.blogspot.com/ ______________________________________________ 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.