Installing and exploring R with swirl

swirl is an interactive learning tool that works inside RStudio. I recommend swirl exercises for all R users, but especially for students who have never used a command script with a software analysis program before.

Install the swirl package inside RStudio. You are now ready to install the swirl package in RStudio. A package is a small program that runs inside R/RStudio. Follow the steps below.

Launch or open RStudio. In the “Console” after the > type:


It should look like this:

screenshot of RStudio
Screenshot of RStudio interface

Launch the swirl package inside RStudio by typing in the Console:



If you choose Option 1. R Programming, you should see these options in the Console

swirl R Programming menu options

For our class, I recommend completing the following units for the first week: 1 – 2

If you get stuck, you can always type info() to get a list of additional commands, as illustrated below:

After you are done with a session, type


You can then either exit RStudio or continue your data analysis.