append.lists: Append the elements of list.src into the corresponding...

View source: R/ListUtil.r

append.listsR Documentation

Append the elements of list.src into the corresponding elements of list.dest.

Description

NB: attributes of list.dest are replaced by list.src.

Usage

append.lists(list.dest, list.src, by.name = FALSE, flatten.src = FALSE)

Arguments

list.dest

null or a list of nulls, in which case list.src is output as a list of lists a list of elements, or lists, in which case the elements of list.src are appendend to the corresponding elements in list.dest

list.src

a list of any element type. Element type may also be a list. Each element is appended to the corresponding element of list.dest.

by.name

If FALSE (default) merge so that list.dest[[1]] is a list of list.dest[[1]] and list.src[[1]], list.dest[[2]] is a list of list.dest[[2]] and list.src[[2]], etc... If TRUE the lists are merged by name rather than by position. When merging by name lists do not have to have the same number of elements and named elements that appear in only one of the lists will simply be appended to the result.

flatten.src

If FALSE then elements E of list.src will be added as is. If E is a list it will be added as a list. If TRUE then if E is a list its contents will be added, rather than as a list.

Value

a list of lists. The inner list contains the elements supplied by list.src appended to the existing elements of list.dest.


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.