mlr3misc (version 0.1.6)

named_vector: Create a Named Vector

Description

Creates a simple atomic vector with init as values.

Usage

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

Run this code
# NOT RUN {
named_vector(c("a", "b"), NA)
named_vector(character())
# }

Run the code above in your browser using DataCamp Workspace