I want to examine my dataset - flights, and use summary() function.
summary(flights["tailnum"])
Results:
tailnum
Length:336776
Class :character
Mode :character
In particular, it does not show that the character variable tailnum has any NAs.
However, when I use sum(is.na(flights$tailnum)), it shows it has NAs.
[1] 2512
What is the best function to examine a categorical variable - show its levels, missing values, total number of rows and frequencies for each level?