View source: R/recode-with-table.R
is_equal | R Documentation |
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)
v1 |
variable 1 |
v2 |
variable 2 |
boolean value of whether or not v1 and v2 are equal
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.