For a given type and length, create a vector of NA's.
Usage
na.vector(
length = 1L,
type = c("logical", "integer", "double", "character", "complex", "numeric", "list")
)Arguments
- length
integer, length of the output vector.
- type
character string naming an atomic type that has an equivalent
NAvalue (i.e., not raw), or"list".
Details
This function also offers a "list" type, which gives a list
of single (logical) NA values. To initialize an empty list of a given
length, use empty.list instead.
