Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

between changed behaviour from NA bounds 'unknown' to 'missing' #3522

Closed
cguill95 opened this issue Apr 23, 2019 · 1 comment · Fixed by #3731
Closed

between changed behaviour from NA bounds 'unknown' to 'missing' #3522

cguill95 opened this issue Apr 23, 2019 · 1 comment · Fixed by #3731
Assignees
Milestone

Comments

@cguill95
Copy link

Dear all,

I have discovered recently the change introduced in version 1.12.0 regarding between and how NA are now treated.

Given this change may break routines relying on the previous behavior, I was wondering whether in the future a parameter could be introduced so that NA are not treated as missing values but as NA (i.e. would return the same as x >= lower & x <= upper).

Thank you very much

Best,
Cyrille

@jangorecki
Copy link
Member

@cguill95 thanks for reporting this regression, for future please try to always include reproducible example.

install.packages("data.table")
library(data.table)
between(1:5, 2L, NA, incbounds=TRUE)
#[1] FALSE  TRUE  TRUE  TRUE  TRUE
install.packages("https://cran.r-project.org/src/contrib/Archive/data.table/data.table_1.11.8.tar.gz")
library(data.table)
between(1:5, 2L, NA, incbounds=TRUE)
#[1] FALSE    NA    NA    NA    NA

@jangorecki jangorecki self-assigned this Jul 30, 2019
@jangorecki jangorecki changed the title Change request: between behavior between changed behaviour from NA bounds 'unknown' to 'missing' Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants