The fourth element of a ggplot2 layer in R, after data, mapping, and geoms, indicates how the data should be summarised. This statistical summary is referred to as a stat in ggplot2. The range of tools in ggplot2 for summarising your data in the plot is a really useful feature.