[R] level names with groupdedData object

Dean Sonneborn dsonneborn at ucdavis.edu
Wed Sep 5 19:27:41 CEST 2007


How do I get a grouped data object to use the level names from the input 
data set?
first I gave the levels some names like this:

male <-factor(male)

levels(male) <- c(“Girls”,”Boys”)

Then I created a groupdedData object but the male variable in not part 
of the grouping formula.

Then I fit an lme and then use this code to create a plot:
plot(myfit.lme, resid(. , type=”p”) ~ fitted(.) | male , id=0.05, adj=-0.3 )

But the plot just used “Male” in both panels. How do I get the plot to 
used "Girls" "Boys"?

Thanks,

Dean



More information about the R-help mailing list