compareNA: Compare two values even if they are NA

Description Usage Arguments Value Author(s) Examples

View source: R/compareNA.R

Description

Compare two values to determine if they are identical. This function supports the comparison of NA values, which base R does not. Note that vectors can also be compared, if they are the same length.

Usage

1
compareNA(v1, v2)

Arguments

v1

Value 1

v2

Value 2

Value

"TRUE" will be returned in the values are identical and "FALSE" will be returned otherwise.

Author(s)

Geva Maimon, geva.maimon (at) rimuhc.ca

Examples

1
2
3
4
5
6
compareNA(1, 1)
compareNA(1, 2)
compareNA(1, NA)
compareNA(NA, NA)
compareNA(1:5, 1:5)
compareNA(1:5, c(1:4, 6))

gevamaimon/CLSAR documentation built on May 17, 2019, 1:53 p.m.