Advanced R for Ecology and Evolutionary Biology

Advanced R for Ecology and Evolutionary Biology

Presential; if needed may change to remote
  • Lecturer(s) or Responsible(s): Inês Fragata & Vitor Sousa (cE3c)
  • Department Responsible: Departamento de Biologia Animal (FCUL)
  • Data: May 9th, 2022 to May 13th, 2022
  • Deadline for Applications: April 4th, 2022
  • Duration: 36 hours
  • Schedule: 9h-12h30 and 14h-17h30, Monday-Thursday; 9h-13h and 14h-18h Friday
  • Nº (min, max) Students: 10-20
  • Location: Faculdade de Ciências da Universidade de Lisboa



Provide students with statistical knowledge and tools to manipulate, analyze and visualize biological data with R. Introduction to modeling, simulations and Bayesian statistics.

Throughout the course, students will be encouraged to apply the knowledge obtained to data from their own work. Depending on the interests of the participants some of the content can be adjusted to focus more on examples from evolutionary biology or from ecology. On the last day, each student will do a small presentation with data available from their own work, or with possible applications to their research question.


  • Refresher into R
  • Exploratory analysis for ecology and evolution (Principal Component Analysis)
  • Linear regression and ANOVA
  • Hypothesis testing using bootstrap and permutations
  • Introduction to analysis of population genetics in R
  • Modeling and simulation of dynamics systems
  • Bayesian statistics and advanced inference algorithms (Markov chain Monte Carlo)
  • Students case studies

This course can have a recognition of 6 ECTs for FCUL PhD students enrolling in it as part of their first doctoral year. These students need to deliver two reports after the course. For students only requiring 5 ECTs recognized in their specific PhD programmes the last 3.5 hours of the course are not mandatory, they need to deliver only the main report and the certificate will be on 'Topics in Advanced R’. Such report(s) are also advised for other students requesting creditation of the course in their institutions.

Minimum formation: - Knowledge of R programming syntax and Rstudio. Preference will be given to participants that attend the introductory course in R or that have previous knowledge in R.





Directed to: PhD or MSc students in Biology, Evolution, Ecology or related areas, and postdocs and other professionals working in related topics

General Plan

Note: This course is intended to be presential, but if needed (e.g. due to COVID-19 security measures by the time of the course) it may be adapted to be given remotely

Detailed Plan:

  • Refresher into R. A very quick refresher on R language to be sure that all students know basic R programming
  • Exploratory analysis for ecology and evolution (Principal Component Analysis). The students will learn how to perform and interpret the results of Principal Component Analyses (PCA) and Multivariate Evolutionary Analyses.
  • Linear regression and ANOVA (factorial and nested ANOVA). Students will learn how to perform and interpret results from general linear models.
  • Hypotheses testing using resampling approaches (e.g. bootstrap and jackknife). Many datasets in ecology and evolution violate assumptions of classical statistical tests, and hence resampling approaches became common practice. Students will learn how to perform hypothesis testing using permutation tests, bootstrap and jackknife.
  • Introduction to analysis of population genetics in R: the students will learn how to compute the basic genetic statistics (genetic diversity, FST), test Hardy Weinberg equilibrium, compare genetic diversity between populations and perform PCA with genomic data.
  • Modeling and simulation of dynamics systems We will use examples from population genetics (genetic drift) and population dynamics (Lotka-Volterra predator-prey model) to illustrate how R can be used to perform simulations. The students will learn how to model and perform simulations of populations evolving through time.
  • Introduction to Bayesian statistics. The students will learn how to use a Markov chain Monte Carlo (MCMC) algorithm to estimate parameters of different models of population dynamics.
  • Student’s case studies.


Students fees.




Fee: Free for 1st year PhD students in  Doctoral programmes  at FCUL (e.g. Biologia), Biodiversity, Genetics and Evolution (BIODIV UL; UP), Biology and Ecology of Global Changes (BEAG UL, UA) and Sustainability Science (UL, several institutions), when the course counts credits for their formation, in which case the delivery of a final report done after the course is mandatory; the course is also free for more advanced PhD students of the BIODIV programme (ULisboa or UPorto); 50 € for more advanced PhD students of cE3c; 80 € for PhD students of the PEERS network (CFE); 125 € for FCUL Master students and unemployed; 180 € for BTI, BI and other PhD students*; 250 € for Professional and postdocs.

(* For PhD students also doing the Introduction to R course the fee is reduced to 120 €)

When the maximum number of students is reached, 10 vacancies will be available for non-paying 1st year PhD students mentioned above, being, by order of preference students from: 1) cE3c; 2) BIODIV (not from cE3c); 3) FCUL (not from cE3c); 4) Sustainability Science (not from cE3c or FCUL); 5) BEAG (not from cE3c or FCUL).

Contacts for Inscription

Candidates should send a short CV and a motivation letter to Vitor Sousa ( and Inês Fragata ( The cv and letter should be named as 1st-lastNAME-CV.pdf and 1st-lastNAME-ML.pdf (that is personalize the name of each file with your first and last name).

For applications for both this course and the ‘Introduction to R programming and biological data analysis’ course please send A SINGLE EMAIL explaining that YOU ARE APPLYING TO BOTH COURSES AND WHY.

In the email please add the following information:

Full Name:



Professional activity: Professional/Postdoc, BTI, BI (or other non-post-doc research grant), PhD student (with/ without scholarship), Lic. (Bachelor)/Master student


PhD student of the 1st year of a Doctoral programme at FCUL, BIODIV (FCUL/FCUP), or BEAG (FCUL or UA)?

If yes to the above question, PhD student doing the Course to count credits for 1st year?:

PhD student of cE3c or CEF (Centro de Ecologia Funcional)?:

Name of the PhD programme: