I have a list of several vectors. I would like to check whether all vectors in the list are equal. There\'s identical which only works for pairwise comparison.
identical
I woud do:
all.identical <- function(l) all(mapply(identical, head(l, 1), tail(l, -1))) all.identical(test_true) # [1] TRUE all.identical(test_false) # [1] FALSE