Hello All,

sample() only sample on one variable x. But I'm interested in sampling
more than one variable without replacement.

Suppose I have 3 vectors x, y, z. I want to draw samples from all
three vectors such that the combination of the three elements in each
draw is not the same as any previous draws. I could use expand.grid to
generate a vector out of the three vectors. But when the number of
vectors are large and the number of elements in some vectors are
large, it will be infeasible to do so.

If you know there is a method on sampling on more than one variables,
would you please let me know? Thank you!

-- 
Tom

______________________________________________
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