[R] bwplot: how to draw smooth curve through medians?
Deepayan Sarkar
deepayan.sarkar at gmail.com
Wed May 12 19:37:02 CEST 2010
On Wed, May 12, 2010 at 3:24 AM, Marius Hofert <m_hofert at web.de> wrote:
> Dear R experts,
>
> Is there an easy way how to combine the black dots (i.e., the medians) in the bwplot
>
> bwplot(voice.part ~ height, data=singer, xlab="Height (inches)")
>
> by a smooth curve?
Depends on what you mean by "smooth".
bwplot(voice.part ~ height, data=singer, xlab="Height (inches)",
panel = function(...) {
panel.bwplot(...)
panel.average(..., fun = median, col.line = "darkgrey")
})
Something more smooth is also possible, but will be misleading.
-Deepayan
More information about the R-help
mailing list