The swirl R package
will teach you R programming and data science interactively. In this article, you will learn to install swirl package in your R installation.
Step 1:
This step assume that you have R and R Studio installed as per the previous article. Open the R Studio console
and type the following line next to > symbol.
> install.packages("swirl")
See the figure below.
Make sure that your internet connection is working before running the command. The swirl packages will be downloaded and extracted successfully. After installation your screen should look like the following.
Step 2:
To start using the swirl packages use the library()
function and this step must be repeated every time you want to use swirl.
Type the following command in the R Studio console and press enter after each line.
> library("swirl")
> swirl()
The above code will install swirl courses for you and get you started with R programming.
Here is the list courses displayed for you by swirl. Note that you can install other courses also. To get started with swirl make your selection and start learning.
Type ?installCourses
to get the list of functions that could help you install new courses.
In this tutorial, you have two option to learn R programming. Either use swirl
to guide you through the learning process or use this tutorial to learn R.
With swirl to guide you through the learning process, you need to load swirl each time.
This tutorial gives you freedom to learn and practice R directly on the R studio console.