Skip to content

Instantly share code, notes, and snippets.

View bgall's full-sized avatar

bgall bgall

View GitHub Profile
@bgall
bgall / r_na_examples
Last active July 6, 2017 18:32
Demonstrates the idiosyncratic behavior of NA values in R
# The below demonstrates the madness of R's treatment of NA values.
# Some examples taken from https://stackoverflow.com/questions/25100974/na-matches-na-but-is-not-equal-to-na-why/25101796
# Logical examples
NA %in% NA
# [1] TRUE
NA == NA