ed from a given body of data.
~ John Tukey
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens
chuck.01
Verzonden: zaterdag 12 mei 2012 23:28
Aan: r-help@r-project.org
Onderwerp: Re: [R] problem with get() inside of lme()
Here is an ex
Here is an example:
library(nlme)
library(lme4)
library(MASS)
data(petrol)
# a variable for one of the columns in petrol
Y.VAR <- "Y"
# This works:
lmer(get(Y.VAR)~EP +(1|No), data=petrol)
# This doesn't:
lme(get(Y.VAR)~EP, random= ~1|No, data=petrol)
# but this does:
lme(Y~EP, random= ~1|No,
please note that I edited the original message to say:
> length(with(new3, perm.score))==length(with(new3, get(TRAIT1)))
[1] TRUE
chuck.01 wrote
>
> Hi,
> The following lines of code are inside of a function, where "TRAIT1" is
> a function variable calling a column-name inside of the da
Hi,
In the following lines of code are inside of a function, where "TRAIT1" is
a function variable calling a column-name inside of the data.frame "new3".
This works just fine:
m2 <- lmer(get(TRAIT1) ~ perm.score + (1|site), data=new3)
but this will not work,
m3 <- lme(get(TRAIT1) ~ perm.sc
4 matches
Mail list logo