Load packages library(tidyverse) Basic testing for equality Testing for equality in a kind of very basic function in computer (and data) science. There is a straightforward function in R to test for equality: identical(1, 1) #> [1] TRUE identical("A", "A") #> [1] TRUE identical(1, 2) #> [1] FALSE identical(1, NA) #> [1] FALSE However this get more complicated if we want to compare more than two elements. One way to achieve this is to compute the number of the different …