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

vec_as_location(missing = "error") and logical NA #1420

Closed
krlmlr opened this issue Jul 30, 2021 · 1 comment · Fixed by #1480
Closed

vec_as_location(missing = "error") and logical NA #1420

krlmlr opened this issue Jul 30, 2021 · 1 comment · Fixed by #1480
Labels
bug an unexpected problem or unintended behavior

Comments

@krlmlr
Copy link
Member

krlmlr commented Jul 30, 2021

Should this fail?

vctrs::vec_as_location(NA, 3, missing = "error")
#> [1] NA NA NA

Created on 2021-07-30 by the reprex package (v2.0.0.9000)

@DavisVaughan
Copy link
Member

Hmm, probably. That would mean this should fail too:

vctrs::vec_as_location(NA_character_, 2, missing = "error", names = c("x", "y"))
#> [1] NA

lgl_as_location() and chr_as_location() don't check missing right now:

static SEXP lgl_as_location(SEXP subscript, R_len_t n,

static SEXP chr_as_location(SEXP subscript, SEXP names,

@lionel- lionel- added the bug an unexpected problem or unintended behavior label Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants