This is a partial type used to represent logical vectors that only contain NA. These require special handling because we want to allow NA to specify missingness without requiring a type.

unspecified(n = 0)

vec_unspecified_cast(x, to)

# S3 method for vctrs_unspecified
vec_type2(x, y)

Arguments

n

Length of vector

Details

vec_unspecified_cast() is a helper to use in your vec_cast() methods. See vignette("s3-vector") for detail.

Examples

#> Prototype: NULL
#> Prototype: logical
vec_c(NA, factor("x"))
#> [1] <NA> x #> Levels: x
#> [1] NA "2019-02-18"
#> [1] NA "2019-02-18 23:28:00 UTC"
vec_c(NA, list(1:3, 4:5))
#> [[1]] #> [1] NA #> #> [[2]] #> [1] 1 2 3 #> #> [[3]] #> [1] 4 5 #>