powered by
getPeaks(x, y, sep = 8, thr = 0.01)
Y=c(rnorm(50,0.4,0.05),rnorm(50,0.8,0.05)) fit=density(Y) getPeaks(fit$x,fit$y)
Run the code above in your browser using DataLab