[R] nlme with a factor in R 2.4.0beta
Christian Ritz
ritz at kvl.dk
Mon Sep 25 10:27:42 CEST 2006
Hi,
the following R lines work fine in R 2.4.0 alpha (and older R versions), but not in R
2.4.0 beta (details below):
library(drc) # to load the dataset 'PestSci'
library(nlme)
## Starting values
sv <- c(0.328919, 1.956121, 0.097547, 1.642436, 0.208924)
## No error
m1 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))),
fixed = list(b+c+d+e~1),
random = d~1|CURVE,
start = sv[c(2,3,4,5)], data = PestSci)
## Error: attempt to select more than one element
m2 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))),
fixed = list(b~HERBICIDE, c+d+e~1),
random = d~1|CURVE,
start = sv, data = PestSci)
Output from sessionInfo() for R 2.4.0 alpha
R version 2.4.0 alpha (2006-09-16 r39365)
i386-pc-mingw32
locale:
LC_COLLATE=Danish_Denmark.1252;LC_CTYPE=Danish_Denmark.1252;LC_MONETARY=Danish_Denmark.1252;LC_NUMERIC=C;
LC_TIME=Danish_Denmark.1252
attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
[7] "base"
other attached packages:
nlme drc
"3.1-75" "1.0-1"
Output from sessionInfo() for R 2.4.0 beta
R version 2.4.0 beta (2006-09-24 r39497)
i386-pc-mingw32
locale:
LC_COLLATE=Danish_Denmark.1252;LC_CTYPE=Danish_Denmark.1252;LC_MONETARY=Danish_Denmark.1252;LC_NUMERIC=C;
LC_TIME=Danish_Denmark.1252
attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
[7] "base"
other attached packages:
nlme drc
"3.1-76" "1.0-1"
Christian
More information about the R-help
mailing list