Skip to content

vec_as_location2("0") #1131

@krlmlr

Description

@krlmlr

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions