R/win.R

Defines functions win

Documented in win

win<-function(x,lambda=0.2){
n<-length(x)
y<-sort(x)
bot.obs<-floor(n*lambda)+1
top.obs<-n-bot.obs+1
z<-ifelse(x<=y[bot.obs],y[bot.obs],x)
z<-ifelse(x>=y[top.obs],y[top.obs],z)
z
}

Try the asbio package in your browser

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

asbio documentation built on Aug. 20, 2023, 9:07 a.m.