♣9♣Visualisation Methods
This section demonstrates – in no particular order – some of the most useful plotting facilities in R.1
The most important function to plot anything is
plot()
. The OO implementation of R is function centric and the plot-function will recognize what object is fed to it and then dispatch to the relevant function. The effect is that you can provide a wide variety of objects to the function
plot()
and that R will “magically” present something that makes sense for that particular object.
We illustrate this with the two very basic and simple objects, a vector and a data frame (the plots appear respectively in Figure 9.1 on page 160 and Figure 9.2 on page 160):
If the standard plot for your object is not what you need, you can choose one of the many specific plots that we illustrate in the remainder of this chapter.
Get The Big R-Book now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.