Session Ready
Exercise

Assign missing values

The read_csv() function also has an na argument, which allows you to specify value(s) that represent missing values in your data. The default values for the na argument are c("", "NA"), so both are recoded as missing (NA) in R. When you read in data, you can add additional values like the string "UNKNOWN" to a vector of missing values using the c() function to combine multiple values into a single vector.

The is.na() function is also helpful for identifying rows with missing values for a variable.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4
  • Load the dplyr package.