2.2 Tutorials

Occasionally in this course, there will be some interactive tutorials I’ve created that you can do to practice the concepts and R skills.

In order to be able to run the tutorials, you need to run the following in your R script.

  • install.packages("devtools", dependencies=T)

After devtools is installed, you shouldn’t have to run that line of code again. However, you will need to run the below line each time there is a new tutorial, as this package will be updated throughout the course.

  • devtools::install_github("ktmccabe/interactivepack", dependencies = T)

Our first tutorial is practicing R skills to load and manipulate dataframes. You should be able to complete that after reviewing the Chris Bail video and Kosuke Imai QSS Chapter 1 resource. The tutorial is based on information provided in Imai Chapter 1. To load the tutorial, run the line of code below in your RStudio Console. It should open up a web browser on your local machine with the tutorial. If a browser does not open, you may need to manually copy/paste the numeric url that pops out on the console into a browser window.

To close out of a tutorial, you can click the stop sign or hit the “Escape” key in the console.

If you encounter an error, you may need to install a package or application that is indicated in the error message.

  • learnr::run_tutorial("rintro", package="interactivepack")

This is a new program that I am using in this course for the first time to create tutorials, so feel free to email if you encounter bugs!!