Re: [R] plotting grouped data object

From: X.H Chen <>
Date: Sat 23 Sep 2006 - 22:25:08 GMT

I don't get your meaning in what is in datagrp, anyway, try:


before calling:
plot(data.grp, outer = ~ y)

Xiaohui Chen

Dept. of Statistics
UBC, Canada

>From: "Afshartous, David" <>
>To: <>
>Subject: [R] plotting grouped data object
>Date: Sat, 23 Sep 2006 18:09:38 -0400
>I'd like to plot the main relationship of a grouped data
>object for all levels of a factor in a single panel.
>The sample code below creates a separate panel for each level
>of the factor. I realize that this could be done in other ways,
>but I'd like to do it via plotting the grouped data object.
>z = rnorm(18, mean=0, sd=1)
>x = rep(1:6, 3)
>y = factor(rep(c("I", "C", "P"), each = 6))
>dat = data.frame(x, y, z)
>data.grp = groupedData(z ~ x | y, data = dat)
>plot(data.grp, outer = ~ y)
>### this produces 1 line each in 3 panels
>### how to collapse all 3 lines into 1 panel?
> mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun Sep 24 08:27:38 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 23 Sep 2006 - 23:30:09 GMT.

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