Graphics



Visualization is central to all data analysis, whether in (bio)statistics, epidemiology, machine learning, data science, etc.

It is hard to overstate the importance of good visualization.

Some of the goals of data visualization include:


R has powerful graphical capabilities built in the core language. It contains two largely separate graphics systems:


There is limited support for interaction between the two. In practice, for a given application, choose one or the other. Note that there are no high-level (user-friendly) functions for the grid graphics system built into the base R distribution, but a few very popular packages have been built on top of it, the most commonly used one today being ggplot2.


Both base and grid graphics systems can produce beautiful, layered, high-quality graphics. It is possible to build custom functions (See 19  Functions) using either system to produce most, if not all, types of plots.