Re: [R] wroung groupedData despite reading Bates and Pinheiro 3 times

From: hpdutra <>
Date: Sat, 19 Jul 2008 13:43:04 -0700 (PDT)

Hi Milton, I tried this and it worked.
But the block structure isn't right because when I try to plot this I still get an error message
> plot(traps,outer=T)

I guess my question is should I try to fit a more simple grouped data structure and leave the formula of my model to deal with it? All I want is to generate a 3 graphs, one for each block, with mice as the response variable, time as the x axis and the different treatments as lines. I know I can do that using lattice. But I want to run my model after that, so I need to get the groupedData correct.

Thank you very much

Humberto Dutra



On 7/19/08, hpdutra <> wrote:
> Hi everyone. I am trying to add a formula to my data using the
> groupedData
> function.
> So I tried to fit the following structure to my data.
> >
> traps<-groupedData(mice~tree|plotID,outer=~time*fruit*veget|block,data=trap)
> but time and block are still considered to be numeric, while in fact they
> should be factor and ordered, respectively.
> > sapply(traps,data.class)
> mice plotID veget fruit time block tree
> "numeric" "ordered" "factor" "factor" "numeric" "numeric" "numeric"


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 19 Jul 2008 - 20:47:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jul 2008 - 22:32:03 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive