[R] plot.design and NAs
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sat Aug 17 18:15:00 CEST 2002
Steven Sullivan wrote:
>
> Hello all--
>
> I'm trying to quickly, graphically, summarize the differences in the sample
> proportion of "yes" responses in a 0-1 variable across sites.
>
> I'm looking for a quick way to do one of the following:
>
> (1) add means onto boxplots (I know there's a boxmeans=T toggle in plot(.),
Is it? I cannot find it.
> but can I do this on proper boxplots?)
A quick hack would be something like
a <- rnorm(10)
b <- rnorm(10)
boxplot(a, b)
segments(1:2 - 0.4, mm <- c(mean(a), mean(b)),
1:2 + 0.4, mm, col = "red")
(with the default boxwidth of 0.8 and the placement of the middle of
boxes at 1, 2, ... )
A cleaner solution would be to change the R code of bxp().
> (2) run plot.design on data containing NAs? (I have tried fun = function(x)
> mean(x, na.rm=T) in plot.design(.)).
Well, I cannot find plot.design anywhere; in which package is it
included?
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list