Graphing functions in R \begin{itemize} \item plot - plots a scatter plot (as a line plot) \item points - adds points to a plot \item text - adds text to a plot \item lines - adds lines to a plot \end{itemize}
Explanation
The following R commands can be used to generate a plot with two points:
gives a single plot but forces both axes to range from 0 to 5. \end{xmpl} \begin{xmpl} The following R commands can be used to generate a plot with two points:
In this example, we plot 3 points. The first two points are by including vectors with a length of 2 as the x and y arguments of the plot function. The third plot was added with the points function. The second and third points were labeled using the text function and a line was drawn between them using the lines function. \\ \begin{notes} Note that if you are unsure of what format the arguments of an R function needs to be, you can call a help file by typing "?" before the function name (e.g. "?lines") \end{notes}