[R-sig-Geo] Plotting box plots boxplots

Joshua Onyango jaonyango at yahoo.com
Wed Jun 10 18:52:13 CEST 2015


Many thanks Domnik - your suggestion worked perfectly fine
Josh 


     On Wednesday, 10 June 2015, 16:43, Dominik Schneider <Dominik.Schneider at Colorado.EDU> wrote:
   

 Josh - 
ggplot doesn't work with the spatial classes of data.  try doing
orf.df=as.data.frame(orf)   first and then plotting orf.df.

Also, you have at least one typo - it should be geom_point
I always get confused with the qplot syntax so not sure if the rest if right. I think ggplot()+ is much easier syntax.
ds




On Wed, Jun 10, 2015 at 9:35 AM, Joshua Onyango via R-sig-Geo <r-sig-geo at r-project.org> wrote:

Hello 
I am trying to plot some box plots in ggplot2 for disease cases against a risk factor where this should appear in 8 coded regions. However when I try run this in R I keep getting this error message: ggplot2 doesn't know how to deal with data of class Spatial Points Data Frame.

 Here is the script: 
qplot(factor(Region.Coding), Cases2012, data=orf, geom_poin=c("boxplot", "jitter"),      main="2012 Cases by Nettles and Regions",fill=factor(Nettles),      xlab="Regions", ylab="Number of cases")
Any help will be highly appreciated
Thanks
Josh
 
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo




  
	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list