User Tools

Site Tools


recol:start

Introduction to R for Ecologists (REcol)

R語言在生態學的應用

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

Instructors: David Zelený (澤大衛) & Po-Ju Ke (柯柏如)

Teaching assistants: Hsun-Hung Chu (朱訓宏) & Sun Yi (孫 誼)

When & where: Tuesday 2,3,4 (9:10-12:10), 綜504

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

Link to NTU COOL: https://cool.ntu.edu.tw/courses/18133

Quick notes by Hsun-Hung Chu: https://github.com/chhtwhc/2022_Fall_REcol

About the class

R program offers a powerful tool for data manipulation, analysis and visualization, and in recent years it has become 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 you basic skills of using the R program so that you can use it for manipulating, analysing and visualising data from your research projects, or in other, more advanced courses focused on R.

The class consists mainly of practical exercises in front of the computer that is running R and RStudio, with brief theoretical modules. Credits will be gained for submitting 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 to use, 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 on how to update and required R and RStudio versions are here.
  • It is essential that we all are using the same version of R and RStudio, to avoid the situation that you will get error messages just because of using outdated program versions.

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%)

About this website

This website hosts all R exercises and their solutions. To be able to access them, you need to log in as a REcol student (user recol, password shared at the beginning of the class).

Anytime you see that the link has a symbol of a lock (), it means that it is accessible only for logged-in users (this is true for exercises, their solutions, and some teaching materials).

recol/start.txt · Last modified: 2022/09/14 06:43 by david