mergeLists: Merges multiple lists into a single list.

Description Usage Arguments Details Value See Also

View source: R/mergeLists.R

Description

Merges multiple lists into a single list.

Usage

1
2
mergeLists(x, func, which.names = NULL, from = c("left", "right")[1],
  allow.ragged = FALSE, warn = if (allow.ragged) TRUE else FALSE)

Arguments

x

List of lists required.

func

Function with arity length(x) required.

which.names

Integer index of the list in x from which to copy names, default NULL indicates not to copy any names optional.

from

Whether to reduce from left or right, defaults to 'left', alternative 'right' optional.

allow.ragged

Whether to allow input lists of unequal length, defaults to FALSE optional.

warn

Logical indicating whether to signal a warning if the name vector specified by which.names does not have the same length as the longest list of x optional.

Details

If the input lists are of unequal length an error is thrown unless allow.ragged is set to TRUE. The warn parameter is only of relevance when x is ragged (input lists are of unequal length). In such a case just make sure the name vector referenced via which.names has the same length as the longest list of x. Each iteration func is called with the current items of x[1...n] as arguments. If x is ragged missing values for current items are represented by NULL.

Value

List.

See Also

octostep


chiefBiiko/octostep documentation built on May 20, 2019, 3:34 p.m.