If you haven’t used swirl before you should read swirl’s site for students and follow the instructions on that page.
To install and start swirl run the following:
install.packages("swirl")
library(swirl)
install_from_swirl("R Programming")
swirl()
After Lecture 1 you should complete the following swirl lessons in the R Programming course: