Practical R Exercises in Swirl Part 1 - Coursera
Practical R Exercises in Swirl Part 1 - Coursera
0. Install R
swirl requires R 3.0.2 or later. If you have an older version of R, please update before going
any further. If you're not sure what version of R you have, type R.version.string at the R
prompt. You can download the latest version of R from https://www.r-project.org/.
Optional but highly recommended: Install RStudio. You can download the latest version of
RStudio at https://www.rstudio.com/products/rstudio/.
1. Install swirl
Since swirl is an R package, you can easily install it by entering a single command from the R
console:
1 install.packages("swirl")
If you've installed swirl in the past make sure you have version 2.2.21 or later. You can check this
with:
1 packageVersion("swirl")
2. Load swirl
Every time you want to use swirl, you need to first load the package. From the R console:
1 library(swirl)
https://www.coursera.org/learn/r-programming/supplement/rAri5/practical-r-exercises-in-swirl-part-1 1/3
5/2/22, 6:35 PM Practical R Exercises in swirl Part 1 | Coursera
swirl offers a variety of interactive courses, but for our purposes, you want the one called R
Programming. Type the following from the R prompt to install this course:
1 install_from_swirl("R Programming")
1 swirl()
Then, follow the menus and select the R Programming course when given the option. For the first
part of this course you should complete the following lessons:
3. Sequences of Numbers
4. Vectors
5. Missing Values
6. Subsetting Vectors
Visit the Frequently Asked Questions (FAQ) page to see if you can answer your own question
immediately.
If you still can't find an answer to your question, then create a new thread under the swirl
Programming Assignment sub-forum and provide the following information:
A descriptive title
Any input/output from the console (copy & paste) or a screenshot
https://www.coursera.org/learn/r-programming/supplement/rAri5/practical-r-exercises-in-swirl-part-1 2/3
5/2/22, 6:35 PM Practical R Exercises in swirl Part 1 | Coursera
https://www.coursera.org/learn/r-programming/supplement/rAri5/practical-r-exercises-in-swirl-part-1 3/3