Validating data

Author

Jeffrey R. Stevens

Published

February 10, 2023

For these exercises, we’ll use the mtcars data set build into base R.

  1. What are the dimensions of mtcars?
# >
  1. In one line of code, view the data types for all of the columns in mtcars.
# >
  1. What is the range of values for the mpg column?
# >
  1. What are all of the possible values used in gear?
# >
  1. Check whether the value 5 is found in the carb column.
# >
  1. Do any columns have missing values?
# >
  1. What is the 3rd quartile for mpg?
# >
  1. Check whether all horsepower (hp) values fall between 50 and 300. Which row numbers fall out of this range?
# >
  1. Make a codebook for mtcars.
# >