Introduction

Acknowledgements

I am indebted to Dr Matt Castle, whose excellent “Introduction to R” practicals form the basis of this workshop.

Structure of this workshop

Many introduction to R workshops focus on the use of R as a statistical computing environment. This workshop focuses instead on learning how to use R as a programming and scientific computing environment. Once you have mastered the ideas in this workshop, you will able to pick up the material in the more advanced workshops much more easily. As such this forms a pre-requisite for many subsequent workshops.

R can be tricky to learn, so please feel free to e-mail any of the demonstrators with questions, though please make sure that you have thought through your question in advance. Most R problems can be solved with judicious use of Google and StackOverFlow…

In the workshop, R commands to be entered into the console are show in grey boxes e.g.

and similarly for the corresponding outputs:

##  [1] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

There is a downloadable PDF version of these notes if you prefer (available via the link next to the title at the top of the page), though I think the HMTL version is easier to work from.

Tasks

Task
All tasks will be denoted in panel boxes like this one. In the HTML version, all solutions can be toggled by hitting the Show Solution buttons. In the PDF version solutions are given in the Appendix and are linked via the Show Solution buttons.