Learn R Programming

PharmacoGx (version 1.1.6)

unionList: Utility to find the union between a list of more than two vectors or lists

Description

This function extends the native union function to work on two or more arguments.

Usage

unionList(...)

Arguments

...
A list of or any number of vector like objects of the same mode, which could also be operated on by the native R set operations

Value

A vector like object of the same mode as the first argument, containing all the elements of all arguments passed to the function

Examples

Run this code
list1 <- list('a', 'b')
list2 <- list('a', 'c')
list3 <- list('c', 'd')
listAll <- unionList(list1, list2, list3)
listAll

Run the code above in your browser using DataLab