Learn R Programming

nlist (version 0.1.1)

relist_nlist: Relists an unlist nlist Object

Description

Relists an nlist object that has been unlisted to a named numeric vector. Ensures absent terms are included and preserves integer class.

Usage

relist_nlist(flesh, skeleton)

Arguments

flesh

An atomic vector

skeleton

An nlist object.

Value

An atomic numeric vector of the values in x.

See Also

as.nlist.numeric() and unlist_nlist()

Examples

Run this code
# NOT RUN {
relist_nlist(c(`a[2]` = 5), nlist(a = 1:3))
# }

Run the code above in your browser using DataLab