Re: [R] DescTools::Quantile

2024-01-29 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
ite a vectorization of the above that will work given a vector of 'p' cumulative probabilities: qtl <- function(p, x, w) { if(length(p)==1) ans <- qtl.one(p, x, w) if(length(p) >1) ans <- sapply(p, FUN=qtl.one, x=x,w=w) ans } ___

Re: [R] DescTools::Quantile

2024-01-27 Thread Duncan Murdoch
On 26/01/2024 10:38 a.m., Michael Meyer via R-help wrote: Greetings, I am having a problem with DescTools::Quantile (a function computing quantiles from weighted samples): # these sum to one probWeights = c( 0.0043, 0.0062, 0.0087, 0.0119, 0.0157, 0.0204, 0.0257, 0.0315, 0.0378, 0.0