[R] boxplot - how to supress groups with low counts

pdb philb at philbrierley.com
Fri Jan 28 14:21:44 CET 2011


In a boxplot - how can I prevent groups where the number of cases is less
than a set threshold from being plotted.

set.seed(42)
 DF <- data.frame(type=sample(LETTERS[1:5], 100, replace=TRUE),
cost=rnorm(100)) 
 count <- boxplot(cost ~ type, data=DF, plot = 0) 
 count$n

## how to only include plots where count$n > 18   
 boxplot(cost ~ type, data=DF)   

Thanks in advance for any solutions.
-- 
View this message in context: http://r.789695.n4.nabble.com/boxplot-how-to-supress-groups-with-low-counts-tp3244424p3244424.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list