all_equal: A more flexible version of all.equal for vectors.
Description
If one argument is specified, check that all elements of that argument are
equal. If two arguments of equal length are specified, check equality of all
of their corresponding elements. If two arguments are specified, a of
length 1 and b of length greater than 1, check that all elements of b are
equal to the element in a. If two arguments are specified, a of length
greater than 1 and b of 1, check that all elements of a are equal to the
element in b.
Usage
all_equal(a, b = NULL)
Arguments
a
A vector, array or list.
b
Either NULL or a vector, array or list of length either 1 or
length(a).
Value
TRUE if "equality of all" is satisfied (as detailed in
'Description' above) and FALSE otherwise.