[R] Adding number of non-NAs to boxplot
John Kane
jrkrideau at yahoo.ca
Mon Apr 21 21:19:32 CEST 2008
Have a look at the addtable2plot function in the
plotrix package.
It should do what you want.
--- stephen sefick <ssefick at gmail.com> wrote:
> boxplot(x[,c(2,15,28,41,54,67,80,93,106)],
> ylab="mg/s", names=c("RM215",
> "RM202", "RM198", "RM190", "RM185", "RM179",
> "RM148", "RM119", "RM61"))
>
> this is the code I am using to make a standard box
> plot. Is there a way to
> get the number of NA observations plotted onto the
> graph easily. I can
> always go in and extract the numbers and add them
> into the boxplot from the
> output of boxplot
>
> d <- boxplot(x[,c(2,15,28,41,54,67,80,93,106)],
> ylab="mg/s",
> names=c("RM215", "RM202", "RM198", "RM190", "RM185",
> "RM179", "RM148",
> "RM119", "RM61"))
>
> d$n
>
>
>
> then I am still confused how to get this information
> into the graph I could
> use a legend but that seems suboptimal- I would
> like to have them under the
> names like
>
> RM215
> n=24
>
> I can provide data, but this seems more of a graph
> construction question
> than an analysis one.
>
> Thanks in advance
>
> Stephen
>
> --
> Let's not spend our time and resources thinking
> about things that are so
> little or so large that all they really do for us is
> puff us up and make us
> feel like gods. We are mammals, and have not
> exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>
__________________________________________________________________
[[elided Yahoo spam]]
More information about the R-help
mailing list