[R] Lattice: Superpose bwplot on dotplot [Newbie Question]

Charilaos Skiadas cskiadas at gmail.com
Tue Jun 17 04:01:59 CEST 2008

On Jun 16, 2008, at 12:13 PM, Lord Yo wrote:

> Hello everyone
> I have dataset containing a monetary value (ABS) and two factors (Fct,
> Group).  I am able to create useful using:
> bwplot(ABS~Group|Fct)
> and
> dotplot(ABS~Group|Fct)
> Question: What do I have to do to overlay the dotplot with the  
> bwplot (same
> data set)?
> I've found a couple of posts that hinted at the possibility of  
> doing that,
> and checked the panel.superpose() help, but the info was too  
> complex for my
> newbie brain.

Try this:

bwplot(ABS~Group|Fct, panel=function(...) {panel.bwplot(...);  
panel.dotplot(...)} )

There are probably others, perhaps better, ways.

> Thanks for your help!
> LY

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

More information about the R-help mailing list