[R] Adding number of non-NAs to boxplot

From: stephen sefick <ssefick_at_gmail.com>
Date: Mon, 21 Apr 2008 13:37:13 -0400


 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.
Received on Mon 21 Apr 2008 - 18:09:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Apr 2008 - 20:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive