May 2018
Beginner to intermediate
364 pages
7h 43m
English
The simplest graph will be a straight line. For R, we have the following example:
x<-seq(-3,3,by=0.05) y<-2+2.5*x plot(x,y,type="b")
In this simple program, type would specify the format of the line, and b would specify both the spot and the line. The corresponding graph is shown here:

The possible values for type are given in the following table:
|
Value
|
Description
|
|
p |
for points |
|
l |
for lines |
|
b |
for both |
|
c |
for the lines part, alone of b |
|
o |
for both overplotted |
|
h |
for histogram-like (or high-density) vertical lines |
|
s |
for stair steps |
|
S |
for other steps (see the following details) ... |
Read now
Unlock full access