[R] All possible samples for two variables

Alexander Engelhardt alex at chaotic-neutral.de
Sat May 21 10:02:47 CEST 2011


Am 21.05.2011 06:30, schrieb Sharma D:
> How to generate all possible samples of size 5 for the two variables in one
> analysis.

Like this?

 > x <- 1:5
 > y <- 6:10
 > expand.grid(x,y)



More information about the R-help mailing list