Missing values (1)
In most cases an NA value (vector element) is regarded ‘missing so we can’t (always) know the outcome’:
- hence
NAin comparisons will always returnNA.- so
x == NAwill just returnNAfor all elements. - check for missing values with
is.na():TRUEfor missing values andFALSEfor everything else
- so