Learn R Programming

kim (version 0.6.1)

identical_all: Check whether all inputs are identical

Description

Check whether all inputs are identical

Usage

identical_all(...)

Value

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

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.

Examples

Run this code
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

Run the code above in your browser using DataLab