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