R in 24 Hours, Sams Teach Yourself by Nicholls Andy & Pugh Richard & Gott Aimee

R in 24 Hours, Sams Teach Yourself by Nicholls Andy & Pugh Richard & Gott Aimee

Author:Nicholls, Andy & Pugh, Richard & Gott, Aimee [Nicholls, Andy]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2015-12-15T16:00:00+00:00


The plot Function

The main function you will use for generating graphics is the plot function. As you will see, this is a very versatile function and can be used to easily generate diagnostic plots for models. In this hour we use it only to plot vectors of data.

Let’s start with just a single vector of data. In this case, just as with the preceding univariate graphics, we can simply pass the vector to the plot function:

> plot(x[1:10])

This plot is shown in Figure 13.4, where you can see that in this instance the values of the vector are plotted against the Y axis. On the X axis we have the index of the position of the element in the vector.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.