An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120214/1aac85e8/attachment.pl>
How to suppress the empty plots in xyplot (lattice)
4 messages · Jeff Newmiller, Jun Shen, Bert Gunter
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.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120214/2afee6ad/attachment.pl>
What do you think "A" * "B" means? Why? Have you read R's Introduction manual? -- Bert
On Tue, Feb 14, 2012 at 9:50 AM, Jun Shen <jun.shen.ut at gmail.com> wrote:
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
<jdnewmil at 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:<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.
? ? ? ?[[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.
Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm