On Sun, Nov 29, 2009 at 9:16 AM, Gabor Grothendieck <[email protected]
> wrote:
> By the way, if you really do want to create the formula anyways then:
>
> ix <- 1:2
> left <- paste(names(freeny)[ix], collapse = ",")
> fo <- as.formula(paste("cbind(", left, ") ~ ."))
> lm(fo, freeny)
>
> or possibly replace last line with:
>
> eval(substitute(lm(fo, freeny))
>
> which will cause the formula to appear in the lm output.
This last line should have been:
This last line should have been:
eval(substitute(lm(fo, freeny), list(fo = fo)))
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.