# Define two vectors
x1 <- c(1, 1, NA, "a", 1, "a", NA, "x")
x2 <- c(1, "a", "x")
# Count difference in number of NAs between the two vectors
supportR::count_diff(vec1 = x1, vec2 = x2, what = NA)
# Count difference in all values between the two
supportR::count_diff(vec1 = x1, vec2 = x2)
Run the code above in your browser using DataLab