On 24/04/18 15:17, Paul Murrell wrote:
Hi
I think the subsetting works by giving you the panels for the
corresponding levels of the conditioning variable(s). Note that, if
there is more than one conditioning variable, you will need more than
one subsetting index.
For example, taking this plot with two conditioning variables and 12
panels in total ...
dotplot(variety ~ yield | year * site, data=barley)
... this produces three pages ...
dotplot(variety ~ yield | year * site, data=barley,
layout=c(2,2))
... and this produces the second page (both panels for the first
conditioning variable and the third and fourth panels for the second
conditioning variable) ...
dotplot(variety ~ yield | year * site, data=barley,
layout=c(2,2))[1:2, 3:4]
Hope that helps.
Hmm. Thanks Paul. I may be able to work with that. But what I really
wanted was to take
bar <- dotplot(variety ~ yield | year * site, data=barley)
and then do (something like)
foo <- bar[<something>]
so that foo contains only the second page of bar, and then do print(foo)
to get a plot of (just) the second page. Without re-issuing a
(modified) plot command.
Is that not at all possible?
cheers,
Rolf.
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.