Understanding and coding the R programming language
The course is about R as a language, to allow participants to understand the code to read and write. It will start from a very basic level and teaches many of the principles that are necessary to be able to write your own programs in R but are usually skipped over in the rush to do some ‘stats’.
Each day is a combination of lectures and exercises with an in-class computer exercise introduced after every new concept. During these exercises the teachers will work with the students to help them achieve the objective of each task, and to answer any questions regarding the concepts.
Syllabus and other information
Syllabus
PNG0088 Understanding and coding the R programming language, 3.0 Credits
Subjects
Statistics, Computer Science and Systems ScienceEducation cycle
Postgraduate levelGrading scale
Prior knowledge
Admitted to PhD studiesObjectives
The aim of the course is to help each student overcome the initial steep learning curve that is associated with learning R, and how to think in a structured and logical way to make programming easier. By the end of the course students will:
Know the differences between data structure types and why these are used
Be able to create data structures and extract information from these
Understand how functions work in R and be able to create their own
Use specific programming methods to automate repetitive processes
Create publication-quality figures from data
Implement and extract information from statistical objects
Write code in a series of logical steps to create complex outputs using combinations of simple functions
Content
The course is about R as a language, to allow participants to understand the code to read and write. It will start from a very basic level and teaches many of the principles that are necessary to be able to write your own programs in R but are usually skipped over in the rush to do some ‘stats’.
Each day is a combination of lectures and exercises with an in-class computer exercise introduced after every new concept. During these exercises the teachers will work with the students to help them achieve the objective of each task, and to answer any questions regarding the concepts.
Formats and requirements for examination
There will be no formal examination to pass this course. Instead, during the course students will demonstrate during in-class exercises the following programming skills and concepts of R.
Creating vector and matrix structures
Importing and manipulating datasets using csv files created from excel
The 3 vector principles in R (recycling, vectorisation & indexing) and how these relate to data objects and functions
if-else statements, iterative loops and writing functions
Manipulating base graphics to produce publication-quality figures
Extracting, storing and plotting data from statistical objects
Combining the principles from 1-6 to solve complex problems
Responsible department
Department of Ecology