powered by
limit(x, upper=quantile(Re(x),0.99,na.rm=TRUE), lower=quantile(Re(x),0.01,na.rm=TRUE), na = FALSE)
FALSE
x
x>high
high
TRUE
NA
low
x[abs(x)>high] <- NA
x <- c(rep(1,5),300, -200) limit(x,100) limit(x,upper=200,lower= -400) limit(x,upper=200,lower= -400,na=TRUE)
Run the code above in your browser using DataLab