User Tools

Site Tools


Introduction to R for Ecologists


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

When & where: Tuesday 2,3,4 (9:10-12:10), 3C Life Science building

Office hours (if you need to consult things related to the class): Tuesdays 14:00-15:30 in R1211.

Instructor: David Zelený (澤大衛)

Link to CEIBA:

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 consist mostly from practical exercise 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).

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-10 minutes each, last one or two lectures, depending on the number of students participating)
recol/start.txt · Last modified: 2017/08/07 11:00 by david