Below is a short video showing how to use the scratchboard either by typing a series of R commands into the script.R window, and then hitting the ‘Run’ button; or, more interactively, by toggling to the R console window and typing the commands one line at a time. In both cases the commands are executed in the R console window, with plots being sent to a separate plot window.
The example in the video is based on a standard set of data included in R called Nile, which is annual flow rates of the river Nile. Technically this is what’s known as a time series, and since R is an object-based language, a command like
plot produces the most sensible plot for data of this type: in this case a plot of the annual river flow against the year.
A list of all the standard datasets in R can be found here. In future posts to the blog we will enter our own data and analyse them. There are plenty of online resources if you want to learn some of the basics of R; for example, these notes give a simple description with examples of some of the most important aspects.