Now, you will apply the techniques on the Hitters
dataset, available in the ISLR2
library.
Make sure the ISLR2 package is installed as discussed in a previous exercise. If not, install it by running
install.packages("ISLR2")
.
Load the Hitters
dataset dataset in R.
library(ISLR2)
data(Hitters)
Use the function str
to examine the structure of the Hitters
object.
Which of the following best describes the variables represented in this data frame?
str
shows no relevant information.Type the number 1, 2, 3, or 4 in the script below to submit your answer.