Re: [R] mismatch between match and unique causing ecdf (well, approxfun) to fail

2015-06-09 Thread Meyners, Michael
ken and working solution found, so all fine :-) Cheers, Michael > -Original Message- > From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] > Sent: Montag, 8. Juni 2015 16:43 > To: Meyners, Michael > Cc: r-help@r-project.org > Subject: Re: [R] mismatch between ma

Re: [R] mismatch between match and unique causing ecdf (well, approxfun) to fail

2015-06-08 Thread Martin Maechler
> Aehm, adding on this: I incorrectly *assumed* without testing that rounding > would help; it doesn't: > ecdf(round(test2,0)) # a rounding that is way too rough for my application... > #Error in xy.coords(x, y) : 'x' and 'y' lengths differ > > Digging deeper: The initially mentioned call to un

Re: [R] mismatch between match and unique causing ecdf (well, approxfun) to fail

2015-06-08 Thread Meyners, Michael
Aehm, adding on this: I incorrectly *assumed* without testing that rounding would help; it doesn't: ecdf(round(test2,0))# a rounding that is way too rough for my application... #Error in xy.coords(x, y) : 'x' and 'y' lengths differ Digging deeper: The initially mentioned call to unique() is

[R] mismatch between match and unique causing ecdf (well, approxfun) to fail

2015-06-08 Thread Meyners, Michael
All, I encountered the following issue with ecdf which was originally on a vector of length 10,000, but I have been able to reduce it to a minimal reproducible example (just to avoid questions why I'd want to do this for a vector of length 2...): test2 = structure(list(X817 = 3.39824670255344,