Re: [R] Create design matrix

2011-11-03 Thread Bert Gunter
?expand.grid is what you're looking for, I think. (which, I agree, is not something one could easily guess) -- Bert On Thu, Nov 3, 2011 at 10:56 AM, Bond, Stephen wrote: > Greetings useRs, > > What is the easiest way to create a design matrix of several factor > variables? Function gendata in

Re: [R] Create design matrix

2011-11-03 Thread Justin Haynes
?expand.grid > expand.grid(c("M","F"),c("Y","O")) Var1 Var2 1MY 2FY 3MO 4FO > Justin On Thu, Nov 3, 2011 at 10:56 AM, Bond, Stephen wrote: > Greetings useRs, > > What is the easiest way to create a design matrix of several factor > variables? Function gendata