User Tools

Site Tools


Introduction to R for Ecologists


EEB5082 (B44U1940), semester 108-1, 3 credits, in English

When & where: Tuesday 2,3,4 (9:10-12:10), 3A Life Science building, National Taiwan University

Office hours: by appointment (if you need to consult things related to the class, just drop me an email and we will fix the time).

Instructor: David Zelený (澤大衛)

Teaching assistants: Po-Yu Lin (林柏佑) and Hsin-Yen Teng (鄧信彥)

Link to CEIBA:

Closed Facebook group: (consider joining!)

About the class

R program offers a powerful tool for analysing and visualising data, and in recent years it became very popular among ecologists (and not only them). It offers great freedom in analysing, manipulating and visualising any type of data, which is not something you can do in clickable software like SAS, SPSS or STATISTICA. However, it also comes up with a steep learning curve of S language and frustration from frequent error messages.

The goal of this practical course is to teach students basic skills of using R program, so as they can use it in analysing and visualising data from their research projects or other, more advanced courses focused on R.

The class consists mostly of practical exercises in front of the computer with running R and RStudio, with brief theoretical modules. Credits will be gained for handing homework assignments, active participation in the class, passing the midterm quiz, and delivering the final oral presentation of individual project (in English).

What to prepare for the class

  • Please, make sure to bring your own computer for the class, with access to school wifi and enought battery for three hours of work (or bring your power cable - we will provide enough electricity sockets). Any system (Windows, Mac, Linux) is ok, as far as you are able to operate it.
  • Install the latest version of R and RStudio before you come for the first class - see instructions here.
  • If you used R and RStudio before, please make sure that you updated to the version required for this class (R version 3.6.1 and RStudio version 1.2.1335 or later); instructions how to update are here.
  • It is important that we all are using the same version of programs, to avoid situation that you will get error messages just because of using outdated version of R or RStudio.

Teaching schedule (subject to changes)

  • Introduction to R and RStudio, basic operations in S language, installation of packages
  • Main types of R objects (vector, matrix, data frame, list), reading and exporting data, creating fully reproducible R script.
  • Loop and function, using the random ecological drift example.
  • How to draw effective scientific figures, high-level vs. low-level graphical functions.
  • Colors, how to choose them and draw them in R.
  • Graphical file formats, raster vs vector graphics.
  • Manipulating data (sorting, merging)
  • Functions which can loop through data.
  • Simple rules for vectorization.
  • Simple rules for parallelization of operations
  • Creating figures from scratch, practising.
  • Midterm quiz (during the midterm week)
  • Final presentations (5 minutes each, last two lectures)

Final evaluation

The final evaluation consists of four parts:

  1. Homework assignments (30%)
  2. Activity in the class, individual work (20%)
  3. Midterm quiz (20%)
  4. Final presentation (30%)
recol/start.txt · Last modified: 2020/01/11 21:30 by david