Carlos C. Sepulveda

🗣 🇪🇸 🇩🇪 🇬🇧 🇫🇷


Régression linéaire avec R

Published March 18, 2022

Atelier interactif vous permettant d’exécuter des commandes R directement sur un navigateur web.

Créé avec R (learnr).

Pour s’en servir, il suffit d’ouvrir le fichier index.Rmd avec RStudio et de cliquer sur le bouton Run Document ou de suivre les instructions ici-bas.

Avec installation locale de R

Si vous avez déjà installé R, il suffit d’utiliser la commande suivante à partir du dossier fr :

Rscript -e 'rmarkdown::run(shiny_args=list(port=5000))'

L’atelier sera disponible à l’adresse http://localhost:5000.

Avec Docker

D’abord, vous aurez besoin d’installer docker sur votre système d’exploitation (instructions). Ensuite, il suffit d’utiliser les commandes make disponibles pour créer l’image et lancer un conteneur. Toute dépendance OS ou R s’y trouvera.

  • Pour créer l’image et lancer un conteneur :
make container_build  # créer l'image
... ⏳
user@host $ make container_attach  # lancer un conteneur
docker run --rm --network host -u 1000:1000 -it -v ./:/regression -w /regression regression/r-learnr
  • Pour Lancer l’atelier:
docker@host:/regression$ cd fr/
docker@host:/regression/fr$ make run
rm index.html && Rscript -e 'rmarkdown::run(shiny_args=list(port=5000))'
Loading required namespace: shiny

processing file: index.Rmd
                                                                                                                    
output file: index.knit.md

/usr/bin/pandoc +RTS -K512m -RTS index.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output index.html --email-obfuscation none --standalone --section-divs --template /usr/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --css css/styles.css --section-divs --reference-location=section --template /usr/local/lib/R/site-library/learnr/rmarkdown/templates/tutorial/resources/tutorial-format.htm --include-after-body footer.html --no-highlight --variable highlightjs=1 --variable progressive=true --variable allow-skip=true --variable learnr-version=0.11.3 --id-prefix section- --variable 'theme:cerulean' --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /usr/lib/R/site-library/rmarkdown/rmd/lua/latex-div.lua 

Output created: index.html

Listening on http://127.0.0.1:5000

Licence : CC BY-SA 4.0 Code