[R] boxplot statistics in ggplot

Vikas Rawal vikasrawal at gmail.com
Thu Feb 8 11:45:24 CET 2007


It will be useful if you could explain the how to use the weighted boxplot
function. The manual does not give details. I have not been able to
make it work. Specifically, how does one write the function?

Vikas



On Wed, Feb 07, 2007 at 07:12:26AM -0600, hadley wickham wrote:
> Hi Vikas,
> 
> Exactly what do you want to label them with?  Generally the purpose of
> the plot is to avoid having explicit labels - you can just read the
> numbers of the axes.  If you want the exact numbers, presenting them
> in a table might be more appropriate.
> 
> I'm not at my development computer at the moment, so I can't give you
> the exact details, but you will have to calculate the statistics
> yourself (using the weighted boxplot function in ggplot) and add them
> to the plot in some way.  This should be a bit easier in the next
> version of ggplot, where the calculation and display are a little more
> distinct.
> 
> Hadley
> 
> On 2/7/07, Vikas Rawal <vikasrawal at gmail.com> wrote:
> >I need to make weighted boxplots. I found that ggplot makes them. I
> >would however like to label them with the boxplot statistics (the
> >median, q1 and q3). In the boxplot function in r-base, I could output
> >boxplot statistics and then write a text on the plot to place the
> >labels. How would one do it with ggplot?
> >
> >Vikas
> >
> >______________________________________________
> >R-help at stat.math.ethz.ch 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.
> >
>



More information about the R-help mailing list