On 3/11/2009 3:15 PM, René Pineda wrote: > I have a univariate binary (1,0) 230,000 records, I need to make 20,000 > iterations of random sampling of a fixed size. Where I put the result of the > sum of selected records for each repetition
X <- rbinom(230000, 1, .5) sample.sums <- replicate(20000, sum(sample(X, 10))) > Thank's > > _________________________________________________________________ > > of your life > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ______________________________________________ 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.