The CoRsica Package for Hockey Analysis in R (0.0: An Introduction)

EP: This is the first part in what I hope will become a lengthy and informative tutorial series on a pseudo-package I am building for R called coRsica. In this instalment, I’ll discuss my intentions and teach you how to install R and RStudio on your machine.

I think hockey analytics is an endlessly interesting field. It pleases me to see and hear from so many others who’ve discovered the same sense of enjoyment from crunching hockey data that I have. My purpose in sharing this R package and tutorial series is to enhance people’s ability to conduct the research and analysis they want to, while learning a little about R in the process.

It took me over a year of learning and practising R to arrive at a point where I felt confident I could answer almost any question I had, given access to the right data. I hope I can accelerate this process for others with the helper functions contained in the coRsica package and the guidance I hope to offer with this tutorial. I should say that, while this approach may be suitable for hobbyists, more serious folk should consider a more comprehensive and complete overview of R. This series will only scratch the surface of what is possible in R. And while the functions I’ll introduce are powerful, there is no substitute for a complete understanding of the R language.

Installing R
Navigate to the official R website and find the CRAN page. You’ll find a list of mirrors and the instructions should prompt you to select the location nearest to you. Select the corresponding link (As I reside in Montreal, QC, I would select the University of Toronto mirror). You’ll then be asked to specify your operating system (In my case, Mac OS X). Go ahead and click the link that applies to the machine you’re using.

Screen Shot 2016-08-13 at 7.25.52 PM

You should now select the most recent version, listed first under Files. If your current OS version does not match the requirements, you should update your operating system first. From here, you’ll follow a standard installation, after which you should be able to find R in your applications folder.

Installing RStudio
RStudio is a popular user interface for R and I personally prefer to work in it. It’s not absolutely necessary that you install it, but the rest of the tutorial will assume you have. To install RStudio, go to their website and select the Download RStudio option. The version you want is RStudio Desktop, which is free. You’ll have to specify your OS once more, and follow the corresponding installer.

Screen Shot 2016-08-13 at 7.42.45 PM

Migrate the RStudio app into your applications folder, and onto your dock or desktop for quicker access. Open up the app to make sure everything is working. You should see something like what is shown below:

Screen Shot 2016-08-13 at 7.47.56 PM

Congratulations! You’re now operating R in RStudio. Don’t worry about the various elements or the text shown in the console, we’ll get into that stuff in the next part of the tutorial.

Author: Emmanuel Perry

Creator and webmaster of corsica.hockey.

1 thought on “The CoRsica Package for Hockey Analysis in R (0.0: An Introduction)”

Leave a Reply