>
> Here is a dodge I often use. This is a mock-up example.
Very instructive (and helpful) ...
>
> ___
>
> bar <- data.frame(matrix(rnorm(1001), nrow = 1))
> names(bar)[1] <- "y" ## say
> head(bar[,1:5])
>
> nbar <- names(bar)
> form <- as.formula(paste(nbar[1], "~", paste(nbar[-1],
] On
Behalf Of James Hirschorn
Sent: Sunday, 24 October 2010 11:51 AM
To: r-help@r-project.org
Subject: [R] Long model formulae
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).
On Oct 23, 2010, at 6:56 PM, Gabor Grothendieck wrote:
On Sat, Oct 23, 2010 at 9:51 PM, James Hirschorn
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 the
On Sat, Oct 23, 2010 at 9:51 PM, James Hirschorn
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 form
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 '.'?
5 matches
Mail list logo