Exercise

Using replace_with_na

Following on from the previous dataset, we now know that we have a few strange missing values.

Now, we are going to do something about it, and replace these values with missings (e.g. NA) using the function replace_with_na().

Instructions

100 XP

For the pacman dataset:

  • Using replace_with_na(), replace missing values "N/A", "na", and "missing" with NA for the year, and score variables.
  • Test to see if you have removed all the missing values using miss_scan_count() at the end.