El vie., 31 ago. 2018 a las 17:08, Serguei Sokol (<so...@insa-toulouse.fr>) escribió: > > Le 31/08/2018 à 16:25, Mark van der Loo a écrit : > > Ah, my bad, you're right of course. > > > > sum(abs(diff(diff( sort(x))))) < eps > > > > for some reasonable eps then, would do as a oneliner, or > > > > all(abs(diff(diff(sort(x)))) < eps) > > > > or > > > > max(abs(diff(diff(sort(x))))) < eps > Or with only four function calls: > diff(range(diff(sort(x)))) < eps
We may have a winner... :) Iñaki ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel