[R] Thinning Lattice Plot

Deepayan Sarkar deepayan.sarkar at gmail.com
Tue Jul 31 18:46:30 CEST 2012

On Tue, Jul 31, 2012 at 6:43 PM, Elliot Joel Bernstein
<elliot.bernstein at fdopartners.com> wrote:

> Thanks everyone for your replies. I didn't know about the ecdfplot function,
> so I'll start using that instead of Ecdf. Why is Ecdf not a lattice plot?
> The result certainly looks like other lattice plots, the arguments are
> similar to other lattice plots. In fact, internally it seems to just call
> the "histogram" function with a different prepanel and panel function. Is it
> not considered a lattice plot only because it isn't part of the lattice
> package?

Of course not. What you are saying is a valid description of the
Ecdf.formula() method, which definitely produces a lattice plot (or
trellis plot if you prefer). However, the example you gave, namely,

x <- rnorm(1e6)

ends up calling Ecdf.default(), which is very much a traditional
graphics function. I should add that this is for Hmisc 3.9-2, and
don't know if the behaviour is different with other versions.

Note that Ecdf() has more features than ecdfplot(), in particular it
allows weights.


More information about the R-help mailing list