powered by
Function to compare even with NA present This function returns TRUE wherever elements are the same, including NA's, and false everywhere else.
is_equal(v1, v2)
variable 1
variable 2
boolean value of whether or not v1 and v2 are equal
# NOT RUN { library(cchsflow) is_equal(1,2) # FALSE is_equal(1,1) # TRUE 1==NA # NA is_equal(1,NA) # FALSE NA==NA # NA is_equal(NA,NA) # TRUE # }
Run the code above in your browser using DataLab