Both
approx(c(-10, 0), c(-10, 0), n = 3)
and
approx(c(0, -10), c(0, -10), n = 3)
yield the same result, but I feel the second one should return points from (0, 0) to (-10, -10) in that order (i.e. the reverse of what is returned).
Does anyone know the rationale behind the reordering of these results and does anyone have an elegant way of ensuring the ordering matches the input arguments?
To clarify, I would like approx(c(0, -10), c(0, -10), n = 3)$x
to give the result 0 -5 -10
and not -10 -5 0
as is the actual case.