inst/testdata/data/kwantyle1.R

 kwantyle1<-function(x,p){
if (is.numeric(x) && is.numeric(p) && 0 <= p && p <=1)
{n=length(x);
h<-(n-1)*p+1;
return (sort(x)[floor(h)]+(h-floor(h))*(sort(x)[floor(h)+1]-sort(x)[floor(h)]));}
else
{NA}}

Try the SimilaR package in your browser

Any scripts or data that you put into this service are public.

SimilaR documentation built on July 1, 2020, 6 p.m.