is_same: Compare vectors with missing values

Description Usage Arguments Value Author(s) References

Description

Compare two vectors treating NA like any other value. If both vectors have an NA for that element, the function returns TRUE, if one has an NA and the other does not, it returns FALSE.

Usage

1
is_same(x, y)

Arguments

x, y

vectors to compare

Value

A logical vector: TRUE if both vectors have the same value, including NA, and FALSE, if they differ.

Author(s)

Winston Chang

References

http://www.cookbook-r.com/Manipulating_data/Comparing_vectors_or_factors_with_NA/


UW-POLS501/r-uwpols501 documentation built on May 9, 2019, 9:37 p.m.