Perhaps you're looking for this?

> ?wtd.quantile
> wtd.quantile(x,weights=w, normwt=TRUE)
  0%  25%  50%  75% 100% 
   1    2    2    3    5 

Andy

From: Jing Yang
> 
> Dear R-users,
> 
> I don't know if there is a problem in wtd.quantile (from 
> library "Hmisc"):
> --------------------------------
> x <- c(1,2,3,4,5)
> w <- c(0.5,0.4,0.3,0.2,0.1)
> wtd.quantile(x,weights=w)
> -------------------------------
> The output is:
>   0%  25%  50%  75% 100% 
> 3.00 3.25 3.50 3.75 4.00
> 
> The version of R I am using is: 2.1.0
> 
> Best,Jing
> 
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to