On Feb 10, 2008 8:25 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Actually thinking about this, not only do you not need sapply but you
> don't even need by:
>
> new2 <- transform(new, sex = factor(sex))
> coef(lm(as.matrix(new2[1:2]) ~ sex/Pred - 1, new2))

Although that's a very slightly different model, as it assumes that
both sexes have the same error variance.

Hadley


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

______________________________________________
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.

Reply via email to