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_location2("0") #1131

Closed
krlmlr opened this issue Jun 1, 2020 · 0 comments · Fixed by #1132
Closed

vec_as_location2("0") #1131

krlmlr opened this issue Jun 1, 2020 · 0 comments · Fixed by #1132

Comments

@krlmlr
Copy link
Member

krlmlr commented Jun 1, 2020

gives a weird error, on ebbc500.

library(vctrs)
vec_as_location2("-1", 4, as.character(-1:2))
#> [1] 1
vec_as_location2("0", 4, as.character(-1:2))
#> Error: Must extract element with a single valid subscript.
#> x Subscript has value 0 but must be a positive location.
vec_as_location2("1", 4, as.character(-1:2))
#> [1] 3
vec_as_location2("2", 4, as.character(-1:2))
#> [1] 4

Created on 2020-06-01 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant