identical_all function

Check whether all inputs are identical

Check whether all inputs are identical

identical_all(...)

Arguments

  • ...: two or more R objects. If a vector or list is entered as an input, the function will test whether the vector's or list's elements are identical.

Returns

the output will be TRUE if all inputs are identical or FALSE if not

Examples

identical_all(1:3, 1:3) # should return TRUE identical_all(1:3, 1:3, 1:3, 1:3, 1:3) # should return TRUE identical_all(1:3, 1:3, 1:3, 1:3, 1:3, 1:4) # should return FALSE identical_all(1:10) # should return FALSE identical_all(rep(1, 100)) # should return TRUE identical_all(list(1, 1, 1)) # should return TRUE identical_all(TRUE, FALSE) # should return FALSE identical_all(FALSE, TRUE) # should return FALSE