Re: [R] ggplot2: changing axis labels in ggplot()

2007-11-13 Thread James D Forester
hadley wrote: > > > That's from a previous version, now you need to do: > > p + scale_x_continuous("Predictor") + scale_y_continuous("Response") > > (or scale_x_discrete if discrete) > > Thanks Hadley -- that worked fine. However, I just noticed that when I try to add an abline to this plo

Re: [R] Getting mean in a dataframe

2007-11-13 Thread James D Forester
Gang Chen-3 wrote: > > Sorry to hijack this thread. I have a similar but slightly different > situation. Using the original poster's example, how to elegantly get > the mean of column V2 when column V1 is either A or C and F1 is 0? > > I am not sure if this is elegant, but it works: a=me

[R] ggplot2: changing axis labels in ggplot()

2007-11-13 Thread James D Forester
Hi all, For various reasons, I need to use ggplot instead of qplot for a complex figure. Everything is working fine, except I cannot figure out how to rename the axis labels in ggplot. I have pasted a simple example below. Any ideas on what I am doing wrong? Thanks for your help. James libra

Re: [R] ggplot2: problem with geom_errorbar and geom_abline

2007-10-04 Thread James D Forester
Ben Bolker wrote: > > > In http://www.nabble.com/plot-graph-with-error-bars-trouble-tf4535734.html > Hadley Wickham says that this is a bug, fixed in the development version. > However, I don't see that the update has propagated to my usual CRAN > mirror yet ... > The error-bar issue is ment

[R] ggplot2: problem with geom_errorbar and geom_abline

2007-10-03 Thread James D Forester
Hi all, I have run into what appears to be a bug in ggplot2; however, I am new to the ggplot syntax, so I might be missing a key element. The main issue is that I cannot get geom_abline to plot when colour is used to identify "group" in the main plot. When I remove colour, geom_abline works b