Hi R Users,

I tried plotting a similar boxplot as it is on the FOLLOWING LINK:

http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png

Sample data is attached -- there are 9 years and 5 cities. In my case I'm
looking to plot "Year" on x-axis and grouping boxplots by "City". I tried
the following code.

foo<-read.table("SampleData.csv", sep=",", header=TRUE)
attach(foo)
boxplot(Admit ~ City + Year, range=0.5, col=2:6) # its not solving the
purpose

I need some help with:
1) Plotting only 9 labels on x-axis (1996-2004).
2) For each "Year", I need to plot FIVE boxplots -- one for each "City". [so
it will look like nine clusters with five boxplots each (with no gap between
them, but with gaps between year labels].
3) Adding "MEAN" to the boxplots.
4) And, legend including "color" + "city name".

Any help would be greatly appreciated!

~Gary
______________________________________________
R-help@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.

Reply via email to