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
evare...@gmx.net

______________________________________________
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