R – installing swirl package

As I started “R Programming” course on Coursera one of the first things to do was installation of swirl R package which allow you to “learn R, in R”. So as laconic instruction says you should be able to install this package in R with following command:


But sometimes this does not work until you specify CRAN repositorty (by the way CRAN stands for Comprehensive R Archive Network). This issue seems to be specific to the latest version of R as of today (version 3.2.1 (2015-06-18) — “World-Famous Astronaut”). So if aforementioned command does not work for you, try this:

install.packages("swirl", repos="http://cran.rstudio.com/", dependencies=TRUE)

To list all installed packages you may use:


And to start using swirl you have to type in:



Leave a Reply

Your email address will not be published. Required fields are marked *