[R] trellis help

Alexander Nervedi alexnerdy at hotmail.com
Mon Mar 20 01:58:54 CET 2006


apoplogies for the repeat post - i just realized i forgot to change the 
subject line


I dont as yet fully understand how trellis works. Advice would be much 
appreciated.

I have a factor variable (2 levels) and a continuous variable and I am able 
to plot a histogram of the frequencies of the continuous variable for each 
level of the factor variable using :

histogram( ~ e.ps | vdc, data = est.prop.score,
                                    xlab = "Propensity Score", type = 
"density",
                                             panel = function(x, ...) {
                                              panel.histogram(x, ...)
                                  panel.mathdensity(dmath = dnorm, col = 
"black",
                                        args = list(mean=mean(x),sd=sd(x)))

The two distributions overlap over an area and I would like to draw vertical 
lines to demark the lower tail of the distribution which has a higher 
median, and the right tail of the distribution with lower  median.

Any suggestion would be really helpful.
thanks

ul-nadi




More information about the R-help mailing list