[R] Adding noise
bbolker at gmail.com
Tue Nov 30 22:31:15 CET 2010
Jim Silverton <jim.silverton <at> gmail.com> writes:
> 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
More information about the R-help