AllIdentical: AllIdentical Function

Description Usage Arguments Details Value Author(s) Examples

Description

This function evaluates whether all elements in a list are identical according to the identical function.

Usage

1
AllIdentical(l, check.all.pairs = FALSE, ...)

Arguments

l

the list of R objects to test

check.all.pairs

logical indicating whether all pairwise tests should be done

...

additional arguments to identical

Details

By default, this function checks whether the first element is identical to all others on the assumption of transivity ((n - 1) calls to identical). If the user changes the check.all.pairs option from FALSE, its default, to TRUE, the function checks all pairs ((n * (n - 1))/2 calls to identical). I don't know of any cases where identical isn't transitive, so I don't know of any cases where this option would be necessary.

Value

TRUE if all elements of l are identical and FALSE otherwise.

Author(s)

Robert Corty

Examples

1
2
AllIdentical(list('a', 'b', 'c'))
AllIdentical(list('a', 'a', 'a'))

rcorty/CortyKit documentation built on May 27, 2019, 3:03 a.m.