approxfun_constant and ecdf (R-based, problems with ret types)