Commit ee0c4c19ed59fc2637e1f3602871cd84c2de3dfa fixed an undesirable NA-handling behaviour.
[x] The NA-handling bahaviour needs to be explicitly stated in the documentation.
[x] Need to add unit-tests to ensure this stated behaviour.
A sketch of desirable behaviour:
When is.na(x), there is not much one can do, and the results should be NA.
When the interval specification contains an NA, e.g. c(1, NA) the na.rm=TRUE reduces the interval to a degenerate interval of a single value when closed [1,1], or nothing when open (1,1). Also there is the issue of soring: it cannot be assessed of the non NA value is the lower or the upper endpoint. This should return an NA. When both endpoints are NAs, return NA.
In other words: if any of x, a, b is NA return an NA.
Commit ee0c4c19ed59fc2637e1f3602871cd84c2de3dfa fixed an undesirable
NA
-handling behaviour.NA
-handling bahaviour needs to be explicitly stated in the documentation.A sketch of desirable behaviour:
is.na(x)
, there is not much one can do, and the results should beNA
.NA
, e.g.c(1, NA)
the na.rm=TRUE reduces the interval to a degenerate interval of a single value when closed [1,1], or nothing when open (1,1). Also there is the issue of soring: it cannot be assessed of the nonNA
value is the lower or the upper endpoint. This should return anNA
. When both endpoints areNA
s, returnNA
.x
,a
,b
isNA
return anNA
.