User Tools

Site Tools

You are not allowed to perform this action

Introduction to R for Ecologists


EEB5082 (B44U1940), semester 110-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: Yu-Pei Tseng 曾宇霈 & Shu-I Lin 林書逸 (check CEIBA for emails)

Link to CEIBA:

About the class

R program offers a powerful tool for data manipulation, analysis and visualization, and in recent years it became very popular among ecologists (and not only them). It offers great freedom and allows you to do whatever you want with your data, which is not the case with 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 an 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 enough 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; instructions how to update and required R and RStudio versions are here.
  • It is important that we all are using the same version of programs, to avoid the situation that you will get error messages just because of using an 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: 2021/10/25 08:44 by david