R is a language that may be helpful to do mathematics. We will use it in other course such as Statistics, Matrices, Numerical analysis or Optimization.
You can use other languages such as Python, Julia, OCaml, according to what you want to do.
The file extension is
.R but we also write
.Rmd files that are files with documentation and runnable R code. You may also directly run some code in the console.
You may have to install packages or libraries in the future, simply do
- install a library :
load a library (runtime) :
You can check this fast course to learn the basics of R without details Learn R in 5 minutes.
Then here is the real course.
- Vector Functions
And here you can learn how to write Rmd documentation.
|Other notes about the Language|
The semicolon |
You will use this a lot, you can see the help for a function with
Open the documentation either in your IDE or your browser with |
Either look for or load a dataset with |
In R, when you are making a generalization of something, you usually name it |
There are a lot of shortened words or it seems so. For instance, you can use |
Here you can find some notes about functions that you might use (mainly in statistics).
- « Take only pictures, leave only footprints. »
- Swirl, R programming
- https://pbil.univ-lyon1.fr/R/pdf/lang01.pdf (01-04)
- Initiation à R - Eric Preud’homme
- Introduction à R - Christophe Lalanne & Bruno Falissard
- R - Vincent ISOZ, Daname KOLANI
- Régression avec R - Pierre-André Cornillonn & Eric Matzner-Løber