[R] grouping values

Ken Knoblauch ken.knoblauch at inserm.fr
Mon Jun 23 15:28:19 CEST 2008


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



More information about the R-help mailing list