On Sat, Oct 23, 2010 at 9:51 PM, James Hirschorn
<james.hirsch...@hotmail.com> wrote:
>
> What is a good way to enter a very long model formula. For example:
>
> y ~ Input.2 + Input.3 + ... + Input.1000
>
> (assuming the corresponding dataframe has many other columns).
>
> Is there a way to convert a character string to a formula? Are there command 
> line expansions in R besides the simple '.'?
>

If y is in column 1 and Input.2, ..., Input.1000 are in columns 2
through 1000 then try this:

   lm(y ~., DF[1:1000])


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
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