DPLYR: A Beginners Guide

What is DPLYR? Dplyr is a grammar of data manipulation, providing a consistent set of verbs that help you solve the most common data manipulation challenges. The next series of examples will show how you can use the shortcuts in Dplyr to achieve the results of traditional R data manipulation, but faster. Setting dplyr up…

Continue Reading

Violin and density plots in ggplot2

Violin Plots This chart is a combination of a Box Plot and a Density Plo that is rotated and placed on each side, to show the distribution shape of the data. The thick black bar in the centre represents the interquartile range, the thin black line extended from it represents the 95% confidence intervals, and the white dot is the…

Continue Reading

Box Plots in ggplot2

Setting up the plot The box plot, in ggplot2, can be really powerful and useful for analysing variation. I will show a few examples of different types of box plots in ggplot2. Basic Box Plot 1 2 3 4 5 6 7 8 9 10 library(ggplot2) theme_set(theme_classic()) # Plot plot <- ggplot(mpg, aes(class, cty)) plot…

Continue Reading