[R] addressing and summarizing columns of a dataframe in nlme package
Eva Remke
evaremke at gmx.net
Thu Jan 22 11:54:26 CET 2009
Hi!
Within the lm function I can address and summarize columns like that:
>lm1<-lm(I(rowSums(spec[,5:81]))~pH)
If I want to do the same in nlme package I get the following error:
> lme1<-lme(I(rowSums(spec[,5:81]))~pH,random=~1|site)
Error in model.frame.default(formula = ~spec + pH + site, data =
<environment>, :
invalid type (list) for variable 'spec'
These kind of list seem to be not accepted by the lme function and my
formula misinterpreted.
Variables are "pH" and "site", dataframe is "spec" and attached.
How can I address and summarize any number of columns of a dataframe in
the nlme package?
Thanks a lot, cheers
Eva
--
Eva Remke
work
Biological Station, Biologenweg 15, 18565 Kloster/ Insel Hiddensee, Germany
phone +49 (0)38300 50251
mobile +49 (0)171 478 3920
fax +49 (0)38300 60672
evaremke at gmx.net
More information about the R-help
mailing list