Thanks, Jeff,

It did work in one way if I use

xyplot(Y~X|as.factor(ID*PERIOD),data=...)

But I would like to do something like

xyplot(Y~X|as.factor(paste("ID=",ID)*paste("PERIOD=",PERIOD)),data=...)

Then, it didn't work

The error message:
Error in paste("ID=", ID) * paste("PERIOD=", PERIOD) :
  non-numeric argument to binary operator

On Tue, Feb 14, 2012 at 11:08 AM, Jeff Newmiller
<jdnew...@dcn.davis.ca.us>wrote:

> Set up a single (factor) variable that identifies the combinations that
> exist, and plot using that variable.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
> Go...
>                                      Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> Jun Shen <jun.shen...@gmail.com> wrote:
>
> >Dear all,
> >
> >In a plot command like
> >
> >xyplot(Y~X|ID*PERIOD,data=...)
> >
> >xyplot will generate all the possible ID*PERIOD combinations. But not
> >all
> >of them have data in there. So I have a lot of empty plots. How can I
> >suppress those empty plots and ask xyplot only to generate plots
> >actually
> >with data. Thanks.
> >
> >Jun
> >
> >       [[alternative HTML version deleted]]
> >
> >______________________________________________
> >R-help@r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to