Skip to main content

1.3) Description (cont'd)


Blue text like this contain exercises and demonstrations to try. Please type everything into R as you read. Start now: open the R programme (e.g. via Start > Programs > Statistics > R, or a shortcut icon if you can see one). A window should appear with some introductory text in blue. Underneath that there’ll be a prompt (>) in red. Type in the following two lines, pressing Enter after each one – and see what happens...

plot(1:10, col="blue")
abline(h=4)

Now you should have two windows within your R console: the GUI window and a new graphics window. Soon we’ll open one more…

Take care when typing! It can be difficult to distinguish the number 1 from a lower-case letter l. But you probably got them right in the exercise we’ve just done – did you?