compList: Compares two lists

Description Usage Arguments Details Value Author(s) Examples

View source: R/compList.R

Description

Compares the elements of two lists to determine if they match.

Usage

1
compList(list1, list2, returnList = FALSE)

Arguments

list1, list2

Lists to compare

returnList

Logical. If FALSE, the output is simplified to a logical vector. If TRUE, a list with the results of each element is returned.

Details

It's been a little while since I first wrote this, and I can't entirely remember exactly why I wrote it. In particular, I'm not sure why I added the returnList option. I guess that's why it's in spiderDev!

Value

If returnList = FALSE, a logical vector giving the results for each element.

If returnList = TRUE, a list is returned.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

Examples

1
2
3
4
5
6
7
aa <- list(1:4, 5:10, 11:24)
bb <- aa
cc <- list(1:4, 5:11, 12:24)

compList(aa, bb)
compList(aa, cc)
compList(aa, cc, returnList = TRUE)

spiderDev documentation built on May 2, 2019, 5:23 p.m.