R TUTORIAL for the First Course. Part 1: Plotting

Prof. Vladimir A. Dobrushkin

This tutorial contains many R scripts. You, as the user, are free to use all codes for your needs, and have the right to distribute this tutorial and refer to this tutorial as long as this tutorial is accredited appropriately. Any comments and/or contributions for this tutorial are welcome; you can send your remarks to

Email Vladimir Dobrushkin

Explicit Protting
R is a statistical analyzation language, and that means it is very good at data manipulation and data analyzation. One key way to analyze data is through plotting, and R excels in this field. R will take two vectors, x and y, of the same length, and will plot them against each other. For example,

produces the following graph:

We can also manipulate the graphical parameters in order to enhance the created visual of the graph. This are added as inputs to the plot() command, but can also be added after the fact. Some commonly used graphical parameters:

plot(x,y2) % plots the second graph of x-y2