O'Reilly logo

RStudio for R Statistical Computing Cookbook by Andrea Cirillo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Looking at your data using the plot() function

The plot() function is one of most powerful functions in base R. The main point of using the plot() function is that it will always try to print out a representation of your data. It basically tries to figure out which kind of representation is the best, based on the data type. This will let you easily and quickly get a first view of the data you are working with.

Behind the scenes, the power of the plot() function comes from being packed with a number of methods developed for specific types of object.

So, when an object is passed as an argument to plot(), it looks for the most appropriate method within the ones available and uses it to represent data stored within the object.

It is even possible to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required