When all values are NA and na.rm = TRUE, find_threshold_crosses returns a non-intelligible error instead of NA or an intelligible error. Perhaps behavior should be to warn and return NA?
I haven't checked how find_local_extrema handles it but I imagine probably also doesn't handle well.
When all values are NA and na.rm = TRUE, find_threshold_crosses returns a non-intelligible error instead of NA or an intelligible error. Perhaps behavior should be to warn and return NA?
I haven't checked how find_local_extrema handles it but I imagine probably also doesn't handle well.
Should also create tests for this case