In the code of function 'ecdf' di R (for example, version 2.15.2), input 'x' is 
sorted first. Because the values are sorted, same values are contiguous. So, 
how about using an approach as inside function 'rle'? Because missing values is 
removed by 'sort', it can be done like this.

i <- c(which(x[-1L] != x[-n]), n)
rval <- approxfun(x[i], i/n, ...)

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to