copyListElements: Copy List Elements into a List of Lists

View source: R/list.R

copyListElementsR Documentation

Copy List Elements into a List of Lists

Description

Copy List Elements into a List of Lists

Usage

copyListElements(x, y, name = deparse(substitute(y)))

Arguments

x

list of lists

y

list of elements

name

name of target list element

Value

x with each sublist being extended by list element name having been taken from y

Examples

x <- list(list(a = 1), list(b = 2), list(c = 3))
y <- list("b1", "b2", "b3")
str(copyListElements(x, y, "b"))


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.