[R] Using panel.densityplot with stripplot
Christopher Oezbek
oezbek at inf.fu-berlin.de
Thu Dec 6 09:04:09 CET 2007
Hi Lattice-Experts/Hi Deepayan,
I have been searching the archives for an answer to this, but am finally
giving up:
I am plotting stripplots above each other using
stripplot(type ~ date, data = email)
which looks exactely as I want (type is a factor with 8 levels). I
addition I would now like to display for each stripplot a density curve.
From examples I would have thought I would need to do:
stripplot(type ~ date2, data = email,
panel = function(x, y, ...) {
panel.stripplot(x, y, ...)
panel.densityplot(x, y, ...)
})
This works as far as the stripplot part is concerned. But
a.) panel.densityplot does not take a y argument.
b.) even if I drop y, no density curve shows up (I guess I am missing
correct dargs here)
I have been toying with
- using panel.superpose but guess that this is not the right approach,
since I do not have a grouping variable (and I have not succeeded in
letting "~ date2 | type" and "~date, groups=email$type" look the way I
want).
- using densityplot instead of stripplot, but then panel.stripplot
complains that argument y is missing. :-(
Many thanks for any advice/ideas!
Christopher
--
Christopher Oezbek
Arbeitsgruppe Software Engineering
Institut für Informatik
Freie Universität Berlin
Takustr. 9, 14195 Berlin, Germany
+49 30 838 75242, Raum 008
http://www.inf.fu-berlin.de/~oezbek/
More information about the R-help
mailing list