mergeLists {rube}R Documentation

Merge two named lists removing duplicates

Description

This convenience functions takes two named lists, e.g., lists containing the varList elements for doBugs() and bugsCheck(), and merges them to include only the second argument's value(s) for duplicated elements, and also containing all non-duplicated elements of both lists.

Usage

mergeLists(list1, list2)

Arguments

list1

Any named list

list2

Any named list (given priority for duplicated elements)

Value

A named list containing the merged input.

Author(s)

Howard J. Seltman <hseltman@stat.cmu.edu>

References

http://www.stat.cmu.edu/~hseltman/rube

See Also

rube

Examples

## Simple example returns list(A=3, B=4, C=5)
mergeLists(list(A=3,B=3), list(B=4, C=5))

[Package rube version 0.3-11 Index]