
To load a package, run library(name of the package) (this time "" around the name of the package are optional, but can still be used if you wish). Once the package is installed, you must load the package and only after it has been loaded you can use all the functions it contains. Some packages are installed by default, all others must be installed by running install.packages("name of the package") (do not forget "" around the name of the package!). You are then able to use this package (and all functions built inside this package) for free.

Remind that R is open source everyone can write code and publish it as a package. Everything else must be installed from packages. Only fundamental functionalities come with R.


Note that RStudio requires the prior installation of the R software provided by CRAN in order to be able to function properly. I use RStudio (and not R) on a daily basis and you will see that all articles on this blog is written in RStudio. RStudio has the advantage of offering both a powerful text editor for writing your code and a place to run the code written in this editor.įor these reasons, I highly recommend using RStudio instead of R. R is a program that runs all your code, and RStudio is another program that allows you to control R in a more comfortable and friendly way. RStudio is an integrated development environment (IDE) for R. a text editor in which to write our code.At the time of writing, this language is (one of) the leading program in statistics, although not the only programming language used by statisticians. The statistical program R is nothing more than a programming language, mainly used for data manipulation and to perform statistical analyses. Photo by Cris DiNoto What is R and RStudio? R
