On Sun, 2010-05-23 at 00:56 -0700, dusadrian wrote:
> This might help, depending on your exact needs:
> > v1 <- sample(letters[1:2], 10, replace=TRUE)
> > v2 <- sample(letters[3:4], 10, replace=TRUE)
> > v3 <- sample(letters[5:6], 10, replace=TRUE)
> > aa <- data.frame(v1=v1, v2=v2, v3=v3)

And now is simple, sample the row of data frame
aa[sample(1:nrows(aa),3),]


-- 
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil

______________________________________________
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