[R] weighted ftable

Andrew Choens andy.choens at gmail.com
Wed Nov 26 19:49:09 CET 2008


I didn't know that. That is exactly what I need.

On Tue, 2008-11-25 at 13:00 -0800, Thomas Lumley wrote:
> On Mon, 24 Nov 2008, Andrew Choens wrote:
> 
> > I need to do some fairly deep tables, and ftable() offers most of what I
> > need, except for the weighting. With smaller samples, I've just used
> > replicate to let me have a weighted data set, but with this data set,
> > I'm afraid replicate is going to make my data set too big for R to
> > handle comfortably.
> >
> > That being said, is there some way to weight my table (similar to
> > wtd.table) but offer the nuanced control and depth of ftable?
> 
> xtabs() will take a weight as the left-hand side of the formula, and its 
> output can then be processed by ftable().
> 
>  	-thomas
> 
> Thomas Lumley			Assoc. Professor, Biostatistics
> tlumley at u.washington.edu	University of Washington, Seattle
-- 
Insert something humorous here.  :-)



More information about the R-help mailing list