50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

cchsflow (version 2.1.0)

is_equal: is equal

Description

Function to compare even with NA present This function returns TRUE wherever elements are the same, including NA's, and false everywhere else.

Usage

is_equal(v1, v2)

Arguments

v1

variable 1

v2

variable 2

Value

boolean value of whether or not v1 and v2 are equal

Examples

Run this code
# 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