5. Installing packages

Because it is open source, R has a constantly growing list of updated packages to be added to the core functions of the program. The packages are usually built by advanced users and programmers who wish to add functionalities, to simplify procedures that may require a long list of commands… Loading and activating these packages in R is fairly easy, providing that you know the name of the package you’d like to install.

Use the install.packages() command to install any package. Place the package name inside the parentheses and between single quotation marks.


[code language=”r”]install.packages(‘xlsx’)[/code]




















Next you need to activate the package. The activation might have to be done again and again, so get used to the following command: library(). Here the quotation marks are not required.

[code language=”r”]library(xlsx)[/code]


 Note that a couple of extra packages were automatically installed to complete the operations.

  Fant du det du lette etter? Did you find this helpful?
[Average: 0]