Creates a simple atomic vector with init as values.

named_vector(nn = character(0L), init = NA)

Arguments

nn

:: character()
Names of new vector

init

:: atomic
All vector elements are initialized to this value.

Value

(named vector()).

Examples

named_vector(c("a", "b"), NA)
#> a b #> NA NA
named_vector(character())
#> named logical(0)