[R] How to suppress the empty plots in xyplot (lattice)

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue Feb 14 18:08:45 CET 2012


Set up a single (factor) variable that identifies the combinations that exist, and plot using that variable.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at 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.ut at 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 at 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.



More information about the R-help mailing list