mapLists: Replaces contents of list A with elements of list B...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/annotation-funcs.R

Description

Replaces contents of list A with elements of list B

Usage

1

Arguments

A

List, elements are coerced to character for mapping to B.

B

List.

removeNAs

Boolean, whether to remove the NAs that occur because an element was not found in B.

Details

Combines two lists, A and B, such that names(A) are preserved, mapping to the values of B, using names(B) as look up. Ie. replaces values in A with values in B, using names(B) as look up for values in A. Once more? See examples. NB! None-mapped entries are returned as NA, but can be removed using removeNAs.

Value

List.

Author(s)

Stefan McKinnon Edwards stefan.hoj-edwards@agrsci.dk

See Also

removeNAs

Examples

1
2
3
A <- list('a1'='alpha','a2'='beta','a3'=c('gamma','delta'))
B <- list('alpha'='b1', 'gamma'=c('b2', 'b3'), 'delta'='b4')
mapLists(A, B)

AnnotationFuncs documentation built on Nov. 8, 2020, 5:56 p.m.