Closed harvey131 closed 1 year ago
Will you accept a pull request to window.xts (via index_bsearch) to modify the behavior to allow NA to the start/end arguments to be interpreted the same as NULL values?
This is a good suggestion. Would you still be willing to create a PR?
We should add tests to ensure that the behavior of window.xts()
matches window.zoo()
in these cases. I'd really appreciate it if you added those in the PR.
I have supported start = NA
and end = NA
in window.zoo
and window<-.zoo
on R-Forge now.
Description
The start and end arguments to window.xts do not support NA the same as if they were NULL.
Inside window_idx() the arguments are passed through .toPOSIXct() which will fail if they are logical (default) NA. However, the start/end arguments are later passed into the
index_bsearch()
function which does check if start/end are NA.Expected behavior
Treat start or end NA the same as if they were NULL.
Minimal, reproducible example
Session Info