Skip to content
Back to formatted view

Raw Message

Message-ID: <loom.20130606T141928-414@post.gmane.org>
Date: 2013-06-06T12:35:54Z
From: Ben Bolker
Subject: lme function cannot find object

Pfeiffer, Steven <pfeiffss <at> miamioh.edu> writes:


> I have been using the function lme() from package 'nlme' for several months
> now without any problems.  Suddenly, it cannot find a factor in my data.
> Is this a new bug of some kind?  My code and output are below.
> Thanks for your help!
> -Steve Pfeiffer

  You have an extra comma at the end of the first line of
your lme code (indicated with ^^^), so R thinks your interaction term is a
separate argument and tries to intepret it outside the context
of the formula ...

library("nlme")
fit.1<-lme(soil.moisture ~ Trenching + DaysSinceEvent,
                                                   ^^^^^
                                         + Trenching:DaysSinceEvent,
                 random = ~ DaysSinceEvent | Plot,
                 data=Dat.middle,
                 method="ML"
                )