January 2018
Beginner to intermediate
422 pages
9h 47m
English
A missing value occurs when an unknown value is stored for the variable in an observation. Missing data is a common occurrence and can have a significant effect on the operations that can be done on the data. In R, missing values are represented by the NA symbol. This symbol is a special value whose properties are different from other values. NA is one of the very few reserved words in R: we cannot give anything this name.
To detect missing values, we can use the is.na() function that indicates which elements are missing. This function returns a logical vector the same length as its argument, with TRUE for missing values and FALSE for non-missings. We apply this function to the data frame so far used:
is.na(SampleData) ...