Oops, it was easier than I thought:
expand.grid(X)
Dimitri

On Fri, Feb 1, 2013 at 8:48 AM, Dimitri Liakhovitski <
dimitri.liakhovitski@gmail.com> wrote:

> Hello!
> I have a list of variable length. One example is:
> X=vector("list",3)
> X[[1]]=1:2
> X[[2]]=1:2
> X[[3]]=1:2
> How could I run expand.grid on the elements of X so that the results would
> be the same as expand.grid(1:2,1:2,1:2)?
>
> Thank you!
> Dimitri
>
> --
> Dimitri Liakhovitski
> gfk.com <http://marketfusionanalytics.com/>
>
>


-- 
Dimitri Liakhovitski
gfk.com <http://marketfusionanalytics.com/>

	[[alternative HTML version deleted]]

