For creating a line chart in R, we use the plot() function.
The basic syntax for creating a line chart is:
plot (v, type, xlab, ylab, main, col)
Description of the parameters used:
v - vector containing the numeric values.
type - takes the value "p" to draw only the points, "l" to draw only the lines and "o" to draw both points and lines.
xlab - label for x axis.
ylab - label for y axis.
main - title of the chart.
col - to give colors to both the points and lines.
Here we will plot the weight of a child in the first four years after birth.

