AnjaM
2012-Nov-19 12:42 UTC
[R] lattice: defining grouping variable only for the upper/lower panel with splom
Using the mtcars dataset, how to define the grouping variable to be valid only for the upper or lower panel? The following doesn't work: # Code start splom(~data.frame(mpg, disp, hp, drat, wt, qsec), data=mtcars, pscales=0, auto.key=list(columns=3), upper.panel = function(...){ panel.grid(...) panel.xyplot(groups=cyl,...) } ) # Code end -- View this message in context: http://r.789695.n4.nabble.com/lattice-defining-grouping-variable-only-for-the-upper-lower-panel-with-splom-tp4650033.html Sent from the R help mailing list archive at Nabble.com.
ilai
2012-Nov-19 19:12 UTC
[R] lattice: defining grouping variable only for the upper/lower panel with splom
On Mon, Nov 19, 2012 at 5:42 AM, AnjaM <a.mirenska@gmail.com> wrote:> Using the mtcars dataset, how to define the grouping variable to be valid > only for the upper or lower panel? > > The following doesn't work: > > # Code start > >Almost : splom(~data.frame(mpg, disp, hp, drat, wt, qsec),> data=mtcars, pscales=0, > auto.key=list(columns=3), > upper.panel = function(...,groups){ > panel.grid(...) > panel.xyplot(groups=mtcars$cyl,...) > } > ) > >> # Code end > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/lattice-defining-grouping-variable-only-for-the-upper-lower-panel-with-splom-tp4650033.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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]]
AnjaM
2012-Nov-20 08:28 UTC
[R] lattice: defining grouping variable only for the upper/lower panel with splom
Thank you very much, this works! -- View this message in context: http://r.789695.n4.nabble.com/lattice-defining-grouping-variable-only-for-the-upper-lower-panel-with-splom-tp4650033p4650144.html Sent from the R help mailing list archive at Nabble.com.