Basic and Advanced R programming

Senast ändrad: 19 januari 2018
DSC_0038-4.jpg

Two courses in R is offered in spring 2018: Basic R programming and Advanced R programming.

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:

Day (working days)

Day    1:       10:00 – 12:00 lectures

                      13:00 – 17:00 self-study of literature

Day 2-5:      08:00 – 12:00 self-study and individual practice of programming

13:00 – 17.00 computer exercise

Day 6-14:    08:00 – 17:00 computer assignment

Day 14:        17:00 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:

Day (working days)

Day    1:       10:00 – 12:00 lectures

13:00 – 17.00 computer exercise

Day    2:       09:00 – 12:00 lectures

                      13:00 – 17:00 computer exercise

Day    3-4:   09:00 – 12:00 guided individual applications

                      13:00 -  17:00 self-study

Day 5-12:    08:00 – 17:00 self-study and computer assignment

Day 12:        17:00 turn in computer assignments

Pass grade requirement: Approved computer assignments

 

Responsible teacher

Wenchou Zhou

 

Fakta:

Basic R programming, 4 ECTS, course period: April 23 to May 10. Lectures will be offered between April 23 and April 27, 2018

 

Advanced R programming, 3.5 ECTS, course period: May 7 to May 22. Lectures will be offered between May 7 and May 11, 2018.

 

Deadline for application: March 16, 2018.

The student is expected to bring his/her own laptop for computer exercises.

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 ECOS research school have priority to the course.


Kontaktinformation
Responsible for PhD education

Göran Bostedt, goran.bostedt@slu.se, 090-786 5027, 070 314 1487

To apply for the course, please follow the instructions here:

Sidansvarig: camilla.widmark@slu.se