Hello,
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

require(xlsx)
require(nlme)

Dat.middle<-read.xlsx(
               "C:\\Users\\S\\Google Drive\\RESEARCH (flash
drive)\\Data\\sm reorganized 2.xlsx",
               sheetName="Middle R Friendly",colIndex=1:5)

class(Dat.middle)
  [1] "data.frame"

dim(Dat.middle)
  [1] 380   5

names(Dat.middle)
  [1] "Honeysuckle"    "Trenching"      "Plot"    "DaysSinceEvent"
"soil.moisture"

Dat.middle[1:10,]
   Honeysuckle Trenching  Plot DaysSinceEvent       soil.moisture
1         Ctrl        tr              TE.tr
0                 15.21690
2         Ctrl        tr              TE.tr
1                 16.68770
3         Ctrl        tr              TE.tr              2
16.11459
4         Ctrl        tr              TE.tr              3
14.57441
5         Ctrl        tr              TE.tr              4
15.16364
6         Ctrl        tr              TE.tr              5
15.32327
7         Ctrl        tr              TE.tr              8
13.26730
8         Ctrl        tr              TE.tr              9
11.81761
9         Ctrl        tr              TE.tr             10
13.87007
10        Ctrl       tr              TE.tr
11                12.26743

fit.1<-lme(soil.moisture ~ Trenching + DaysSinceEvent,
                                        + Trenching:DaysSinceEvent,
                random = ~ DaysSinceEvent | Plot,
                data=Dat.middle,
                method="ML"
               )
Error in lme.formula(sm ~ Trenching + DaysSinceEvent,
+Trenching:DaysSinceEvent,  :
  object 'Trenching' not found

class(Dat.middle$Trenching)   #Oh, look, here is the factor it said it
couldn't find!
  [1] "factor"

length(Dat.middle$Trenching)
  [1] 380

Dat.middle$Trenching[1:10]
  [1] tr tr tr tr tr tr tr tr tr tr
   Levels: tr un

	[[alternative HTML version deleted]]

