Jim Silverton <jim.silverton <at> gmail.com> writes: > > Hello, > I have some discrete pvalues and I would like to sort them. Then add random > noise so that they are ordered the same way as the original pvalues. Off > course I don't want any pvalues less than 0 or greater than 1. Any ideas on > how to do this in R? >
Are you basically just trying to break ties? Something like (completely untested) eps <- min(diff(c(0,sort(pvaluevector),1)))/2 pvaluevector+runif(length(pvaluevector),min=-eps,max=eps) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.