Ken Knoblauch <ken.knoblauch <at> inserm.fr> writes: > Daren Tan <daren76 <at> hotmail.com> writes: > > I tried aggregate, apply etc, but can't get the right result. > do.call("expand.grid", rep(list(c("u", "l")), 3)) > Var1 Var2 Var3 > 1 u u u > 2 l u u > 3 u l u > 4 l l u > 5 u u l > 6 l u l > 7 u l l > 8 l l l Oops, sorry, I answered wrong message. This should have been to the subject line "expand.grid". Slippery keyboard...
Apologies ______________________________________________ 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.