Source: https://www.i3s.unice.fr/~malapert/R/pdf/base-r.pdf