Re: [R] working with summarized data

From: Thomas Lumley <>
Date: Thu 31 Aug 2006 - 03:00:51 EST

On Wed, 30 Aug 2006, Rick Bischoff wrote:

>>> Unfortunately, it seems that most(all?) of R's graphics and summary
>>> statistic functions don't take a weight or frequency argument.
>>> (Fortunately the models do...)
>> I have been been meaning to add this functionality to my graphics
>> package ggplot (, but unfortunately haven't
>> had time yet. I'm guessing you want something like:
>> * scatterplot: scale size of point according to weight (can do)
>> * bar chart: bars should have height proportional to weight (can do)
>> * histogram: area proportion to weighting variable (have some half
>> finished code to do)
>> * smoothers: should automatically use weights
>> * boxplot: use weighted quantiles/letter statistics (is there a
>> function for that?)
>> What else is there?
> densityplot is the only other one I can think of at the moment...
> With the rest of those, I could certainly live without it though!

Density plots, scatterplot smoothers, hexbin plots, bubble plots, histograms, and boxplots are available in the survey package. These are probability-weighted rather than frequency-weighted but it doesn't matter for graphics. You could use them as is (which requires setting up a survey design object) or rip the internals out of them.

         -thomas mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Aug 31 03:08:47 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 30 Sep 2006 - 02:02:38 EST.

Mailing list information is available at Please read the posting guide before posting to the list.