[R] lme - plot - labels

Douglas Bates bates at stat.wisc.edu
Wed Nov 22 19:48:43 CET 2006


On 11/22/06, Doktor, Daniel <d.doktor at imperial.ac.uk> wrote:
> Hello there,
>
> I am using the 'nlme' package to analyse among group and in between
> group variances. I do struggle a little using the respective
> plot-functions. I created a grouped object:
>
> group.lme <- groupedData(obsday ~ oro | id,
> data=read.table("data-lme.txt", header=T),
>         labels=list(x = "Day of Year", y = "ID number"))
>
> When I plot, however
>
> plot(group.lme)
>
> the y-labels appear on the x-axis and the x-labels do not are not drawn
> at all.

I can't reproduce the problem.  Try

> library(nlme)
> data(sleepstudy, package = "lme4")
> sleep <- groupedData(Reaction ~ Days|Subject, sleepstudy,
+    labels = list(x = "Days of sleep deprivation", y = "Average
reaction time (ms)"))
> plot(sleep)

Under R-2.4.0 that produces a plot with correctly labeled axes.

> Any advice?

Well there is always the old "read the manual" approach.  The formula
for a groupedData object is of the form "response ~ covariate |
groups"
> I am using R 2.2.1 on Windows XP



More information about the R-help mailing list