Re: [R] how to do by-processing using weighted.mean

2005-01-10 Thread Thomas Lumley
On Sun, 9 Jan 2005, Denis Chabot wrote:
Hi,
I'd like to compute the weighted mean of some variables, all using the same 
weight variable, for each combination of 3 factor variables.

I found how I could use summarize (from Hmisc) to do normal means for 
combinations of 3 factors, but I cannot find a way of doing weighted means. 
Is it possible in R?
?weighted.mean
-thomas
__
R-help@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


Re: [R] how to do by-processing using weighted.mean

2005-01-09 Thread Frank E Harrell Jr
Denis Chabot wrote:
Hi,
I'd like to compute the weighted mean of some variables, all using the 
same weight variable, for each combination of 3 factor variables.

I found how I could use summarize (from Hmisc) to do normal means for 
combinations of 3 factors, but I cannot find a way of doing weighted 
means. Is it possible in R?

Thanks in advance,
Denis Chabot
__
R-help@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

It's in one of the summarize examples!
--
Frank E Harrell Jr   Professor and Chair   School of Medicine
 Department of Biostatistics   Vanderbilt University
__
R-help@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