Source: https://larmarange.github.io/analyse-R/analyse-R.pdf