IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Dealing With Missing Data in R

Visualizza il corso

Istruzioni dell'esercizio

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.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# 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(___, ___, ___, ___))
Modifica ed esegui il codice