powered by
Remove the Outliers in a Vector of 1D Coordinates
rmoutlier1d(x, dy_thr = dnorm(4), clustersize_thr = 3, gapsize = 10)
a numeric vector
the threshold for dy
the threshold for cluster size
the threshold of points in recognizing data free gap
# NOT RUN { x=c(1,10:30,50) par(mfrow=c(2,1)) plot(density(x)) plot(density(rmoutlier1d(x))) # }
Run the code above in your browser using DataLab