R Data Visualization Recipes
上QQ阅读APP看书,第一时间看更新

How to do it...

We proceed with the recipe as follows:

  1. Use an if statement to check and install the car package:
> if(!require(car)){ install.packages('car') }
  1. Load the package and use ? to call for data set documentation:
> library(car)
> ?Salaries
  1. Check both the first row and the data set object type:
> head(Salaries)
> class(Salaries)