[R] re shape package - use one cast() instead of many

hadley wickham h.wickham at gmail.com
Wed May 6 04:35:21 CEST 2009


On Tue, May 5, 2009 at 3:55 PM, jwg20 <jason.gullifer at gmail.com> wrote:
>
> Thanks for your help! I wasn't sure what the margins variable did, but I'm
> beginning to understand. I'm almost there, but with my data (and with ff_d)
> I tried to margin over two variable names, however it only does one of them.
> So with ff_d I set margins=c("treatment","variable"); however I only ever
> get 1_(all) 2_(all) and 3_(all)... never something like (all)_painty. (This
> also happens for margins=TRUE)

Ah ok.  Margins only work in one direction, so currently there's no
way to do what you want in a single step.

Hadley

-- 
http://had.co.nz/




More information about the R-help mailing list