Basic and Advanced R programming

Senast ändrad: 08 februari 2024

Two courses in R May to June 2024: Basic R programming and Advanced R programming. Apply by March 26th. The course will be offered over zoom with no on-campus teaching.

4 ECTS Basic R programming

Prerequisites: Admitted to a postgraduate program. The course is suitable for all graduate students. No programming experience is required, but students are recommended to possess knowledge in basic mathematical statistics.

Objective: The aim of the course is to provide basic knowledge of the R language and on the skills of writing R scripts for practical applications. The course will focus on the core of R programming language, and data manipulation with R.

Upon completion of the course the student should be able to:

- master the basic knowledge of R language,

- master functions commonly used for data manipulation,

- generate basic descriptive statistics, conduct a simple multiple linear regression analysis and specification test, and

- produce different types of data plot.

The course consists of lectures, computer exercises and self-study.

Content: The course begins with an orientation connected to the following concepts:

  • What is R and what can R do?
  • An IDE (Integrated Development Environment) for R

Further, the course covers programming of R, specifically:

  • Data types and data structures: vector, list, matrix, data frame, factor
  • Import data and write out data
  • Data manipulation
  • Control flow
  • Write simple function
  • Plot
  • Regression analysis

In computer exercise, students will write R scripts to solve specific problems by using the knowledge from the lecturers. Exercise materials are provided by the lecturer.

Pedagogical form: lectures and computer exercise.

Literature:

An introduction to R. Available at: https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf

Quick-R. Available at: https://www.statmethods.net/

Preliminary time schedule:

Week 1: Lectures, self-study of literature, computer exercises

Week 2: Computer assignment

Week 3: Examination - turn in computer assignment.


3.5 ECTS Advanced R programming

Prerequisites: Admitted to a postgraduate program, as well as a basic course in basic R programming (equivalent to the course Basic R programming (course code). The course is suitable for all graduate students.

Scope: Advanced course, aimed at students with basic R knowledge.

Purpose: This advanced course in R programming aims atgiving in-depth knowledge in advanced R programming and to develop the student’s skills in writing R functions and efficient scripts for solving complex applications. The course focus on writing R functions, efficient data manipulation, and advanced plot.

Upon completion of the course the student will be able to:

- write advanced R functions,

- advanced data manipulation like reshape data, merge data,

- use advanced plot package, and

- perform data analysis on different topics.

The course offered a combination of lectures, computer exercises and self-study.

Content: The lectures provide an overview of the following topics:

  • R functions in depth: parameters, return values, variable scope
  • Debugging
  • Extract data from function output
  • Advanced data manipulation
  • Advanced R graphics: ggplot2
  • A group of useful packages

The lectures are followed by computer exercises where the students either work on material provided by the lecturer, or work on their own statistical material.

Pedagogical form: lectures and computer exercise.

Literature:

R for Data Science: Available at: http://r4ds.had.co.nz/

ggplot2. Available at: http://ggplot2.tidyverse.org

Preliminary time schedule:

Week 1: Lectures, self-study of literature, computer exercises

Week 2: Computer assignment

Week 3: Examination - turn in computer assignment.

Pass grade requirement: Approved computer assignments

 

Application

Apply to: Basic R programming, 4 ECTS, course period: May 13th to May 30th, 2023. Obligatory meetings: May 13-17.

Application deadline: March 26, 2024

Apply to: Advanced R programming*, 3.5 ECTS, course period: May 20th to June 5th, 2023. Obligatory meetings: May 20-24

Application deadline: March 26, 2024

The student is expected to bring their own laptop for computer exercises.

*Note that either the basic R course offered here or knowledge at the equivalent level is needed for the Advanced R course. Please get in touch with Camilla.Widmark@slu.se if you are not sure that you meet the standards for the pre-requisite knowledge needed for this course.

Apply

Fakta:

The Department reserves the right to cancel the course if there are not more than 5 students who have applied for the course. There is no tuition fee. The students should bring their own laptops for computer exercises. The student is responsible for any housing and travel costs. Students belonging to the SILVA research school have priority to the course.

Important: Please note that in view of the COVID-19-related restrictions, the obligatory meetings may be run either as virtual only (via e.g. zoom) or with a virtual option for participants who cannot attend physical meetings.


Kontaktinformation

Ansvarig för forskarutbildning

Camilla Widmark, camilla.widmark@slu.se, +46907868596, +46702929018