5 Graphics
Warning: `data_frame()` is deprecated, use `tibble()`.
This warning is displayed once per session.
Plotting and data visualisation is probably the best thing about R.
The base system alone provides lots of useful plotting functions, but the
ggplot2
package is exceptional in the consistent and powerful approach it
takes to visualising data. This chapter focusses mostly on ggplot
, but does
include some pointers to other useful plotting functions.
It’s also worth pointing out here that the O’Reilly R Graphics cookbook is available as a pdf download and is a much more comprehensive source than this book.
The examples below are more selective and show plots likely to be of particular use in reporting your studies.
The emphaisis on showing you how to make good plots that help you explore data and communicate your findings, rather than simply reproduce the output of SPSS or Excel.