April 2017
Beginner to intermediate
420 pages
9h 58m
English
To begin with, we will load the necessary packages in order to download the data and conduct the analysis. Please ensure that you have these packages installed prior to loading:
> library(ggplot2) #support scatterplot > library(psych) #PCA package
Let's also assume you've put the two .csv files into your working directory, so read the training data using the read.csv() function:
> train <- read.csv("NHLtrain.csv")
Examine the data using the structure function, str(). For brevity, I've included only the first few lines of the output of the command:
> str(train) 'data.frame': 30 obs. of 15 variables: $ Team : Factor w/ 30 levels "Anaheim","Arizona",..: 1 2 3 4 5 6 7 8 9 10 ... $ ppg : num 1.26 0.95 ...Read now
Unlock full access