Learning R with Hockey Data and learnr

By Meghan Hall in R

June 29, 2020

When I created a tutorial with swirl earlier this year, some people asked me why I hadn't instead used learnr, another tool for interactive learning. I wasn't familiar with learnr, but since it's based in R Markdown and one of my goals for this year is to improve my skills in that area, I decided to give it a try!

So I've created two tutorials in learnr, one that is a true introduction for beginners (focused on the tidyverse) and one that goes a little bit deeper into data manipuation with pivoting and joining data. These tutorials (screenshot below) live in a package I created called betweenthepipes. More detail on the package and the tutorial content is available on my Github.

To access these tutorials, simply download the package. If you're working in RStudio 1.3 or later, there should be a Tutorial pane in the upper right corner of the program where you should see the two tutorials listed. If not, or if you'd prefer to access the tutorials directly, follow the second block of code below.

# Install my package via github

install.packages("devtools")
devtools::install_github("meghall06/betweenthepipes")

# Only necessary if you don't have RStudio >= 1.3
# Or if you want to access them directly

learnr::run_tutorial("intro", package = "betweenthepipes")
learnr::run_tutorial("data_manip", package = "betweenthepipes")
Posted on:
June 29, 2020
Length:
1 minute read, 212 words
Categories:
R
See Also: