identical: A version of identical() that accepts arbitrarily many...

View source: R/identical.R

identicalR Documentation

A version of identical() that accepts arbitrarily many inputs. (It turns out that Reduce(identical, ...) doesn't do what you might like.)

Description

A version of identical() that accepts arbitrarily many inputs. (It turns out that Reduce(identical, ...) doesn't do what you might like.)

Usage

identical(...)

Arguments

...

(list) The things to test for identicality.

Value

(boolean) Whether they are all identical.

Examples


identical(1:3*1, c(1, 2, 3), seq(3, 9, 3) / 3)           # TRUE
identical(1:3, c(1, 2, 3), seq(1, 3))                    # FALSE
identical(c(1, 2, 3), c(2, 4, 6) / 2, c(3, 6, 9) / 3)    # TRUE 
identical(1:3, c(1, 2, 3), seq_len(3))                   # FALSE 
identical(1:3, seq_len(3), seq_along(1:3))               # TRUE 


ttriche/Rscripts documentation built on Sept. 14, 2023, 2:52 a.m.