Reorder geom_bar or anything else in ggplot by the value of your choosing

You still find people on StackOverflow counseling to redefine the factors of a data.frame to reorder elements of a ggplot graphic. In 2020, this is crazy. Who still uses factors, anyways? (And who still uses data.frames when you have data.table?) Anyways, if you want to reorder geom_bar or anything else in ggplot by the value […]

Draw anything you want with R on the Cartesian grid

Most of the graphics documenation in R is dedicated to high level plotting packages. Sometimes, these packages remind me of LaTeX: you spend less time producing graphical elements you need than getting rid of elements you have not asked for. Some of these packages are great, of course, and you should definitely use them for […]

Premiers pas avec R et RStudio

Cet exercice a pour préalable d’avoir installé R et RStudio. Se familiariser avec l’interface Ouvrez RStudio. Vous devriez voir l’interface comme à l’image ci-dessous, pour l’heure sans la partie A. La partie C est en principe vide: Les fonctions de ces différentes parties sont les suivantes: A : Fenêtre d’édition des fichiers sources. Ici vous […]