relist_nlist: Relists an unlist nlist Object

Description Usage Arguments Value See Also Examples

View source: R/relist-nlist.R

Description

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

Usage

1
relist_nlist(flesh, skeleton)

Arguments

flesh

An atomic vector

skeleton

An nlist object.

Value

A numeric vector of the values in x.

See Also

as_nlist.numeric() and unlist_nlist()

Examples

1
relist_nlist(c(`a[2]` = 5), nlist(a = 1:3))

nlist documentation built on Sept. 5, 2021, 6:05 p.m.