Learn R Programming

mlr3misc (version 0.15.1)

named_vector: Create a Named Vector

Description

Creates a simple atomic vector with init as values.

Usage

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

Value

(named vector()).

Arguments

nn

(character())
Names of new vector

init

(atomic)
All vector elements are initialized to this value.

Examples

Run this code
named_vector(c("a", "b"), NA)
named_vector(character())

Run the code above in your browser using DataLab