Getting started with R how to install a package

To install a package in R call the install function in the prompt like this Then when you have install swirl you can load in the library in your R file by using library() Now the library swirl has been loaded and you can now call the swirl functions Source:

RStudio run all

To run all the lines in your R file use the Source command or the shortcut Ctrl + Shift + S or if you want the echo feedback use Ctrl + Shift + Enter. The latter is close do the run a single line Ctrl + Enter. This will run the source command: