Using miss_scan_count
You have a dataset with missing values coded as "N/A", "missing", and "na". But before we go ahead and start replacing these with NA, we should get an idea of how big the problem is.
Use miss_scan_count to count the possible missings in the dataset, pacman, a dataset of pacman scores, containing three columns:
year: the year that person made that score.initial: the initials of the person.score: the scores of that person.
This exercise is part of the course
Dealing With Missing Data in R
Exercise instructions
For the pacman dataset, use miss_scan_count() to search for strange missing values:
"N/A","missing","na", and" "(a single space).- To search for strange missing values all at once.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Explore the strange missing values "N/A"
miss_scan_count(data = ___, search = ___)
# Explore the strange missing values "missing"
miss_scan_count(data = ___, search = ___)
# Explore the strange missing values "na"
___(___ = ___, search = list(___))
# Explore the strange missing values " " (a single space)
miss_scan_count(data = ___, search = ___)
# Explore all of the strange missing values, "N/A", "missing", "na", " "
miss_scan_count(data = ___, search = list(___, ___, ___, ___))