[R-sig-ME] X multiple Y Scatter Plots

Douglas Bates bates at stat.wisc.edu
Sat Mar 19 09:22:12 CET 2011


On Fri, Mar 18, 2011 at 7:57 PM, Shankar Lanke <shankarlanke at gmail.com> wrote:
> Dear All,
>
> I thank R community for the support.
>
> I am looking for a code to plot X and Multiple Y scatter plot.(Table below).
> However I dont want to plot all my IDs, one at a time or two ID's at a time

> ID  X    Y1  Y2
> 1  0.5  0.4   1
> 1  0.2  0.1   2
> 1  1      2    3
> 1  4      5    4
> 2  2.5   3    5
> 2  3      4    6
> 2  0.5  0.4   7
> 2  0.2  0.1   8
> 2   1      2   9
> 2   4      5   8
> 2  2.5   3    7
> 2  3      4    6
> 3  0.5  0.4  5
> 3  0.2  0.1  4
> 3  1      2
> 3   4      5
> 3  2.5   3
> 3  3      4

Is it intentional that there are no Y2 values for the last 4
observations on ID 3?

If you want the data for the different ID's to appear in separate
panels of a single plot you can use

library(lattice)
xyplot(Y1 + Y2 ~ X | ID, myData)




More information about the R-sig-mixed-models mailing list