Introduction to R

Study Board of Market and Management Anthropology, Economics, Mathematics-Economics, Environmental and Resource Management

Teaching language: English
EKA: B540046102
Censorship: Second examiner: None
Grading: 7-point grading scale
Offered in: Odense
Offered in: Summer school (spring)
Level: Bachelor

Course ID: B540046101
ECTS value: 5

Date of Approval: 19-09-2023


Duration: Intensive course

Course ID

B540046101

Course Title

Introduction to R

Teaching language

English

ECTS value

5

Responsible study board

Study Board of Market and Management Anthropology, Economics, Mathematics-Economics, Environmental and Resource Management

Date of Approval

19-09-2023

Course Responsible

Name Email Department
Serena Vigezzi sevi@sam.sdu.dk CPop

Offered in

Odense

Level

Bachelor

Offered in

Summer school (spring)

Duration

Intensive course

Recommended prerequisites

The course is open to both bachelor and master students motivated to learn R. The course is designed so that students from different backgrounds and levels with no prior knowledge of R or statistics can learn the program and how to manage and analyze data.

Aim and purpose

The purpose of this course is to introduce the students to the programming language R. R is one of the most popular programming languages in data science, statistics, and other quantitative sciences. In the course, students will get to analyse data from a broad range of disciplines: health, population, economy, etc. R is a free, powerful, versatile, and easy to use tool for data analytics and visualisation. The students will learn how to master R, from installation to basic statistics. By the end of the course, the students will be able to use general programming features, analyse and visualise data. 

Content

Day 1: Fundamentals - Create an object, data type, vector, basic arithmetic, open and save a dataset and basic plot
Day 2: Data structure -  How to work with data frame, matrix, array and list
Day 3: Function, condition and loop
Day 4:Packages and plots in base R
Day 5: Summary statistics - Frequency, and measures of location (e.g. mean), spread (e.g. variance) and dependence (e.g. covariance)
Day 6: Linear regression - Theory, application and interpretation
Day 7: Tidyverse and ggplot2 - Data transformation, summarising, grouping, reshaping and visualising data
Day 8: Maps
Day 9: Workshop
Day 10: Exam

Description of outcome - Knowledge

  • Describe and explain the different data types and structures in R
  • Understand basic arithmetic and statistical functions in R
  • How to create one’s own function
  • How to create graphics in R

Description of outcome - Skills

  • Open datasets in R
  • Manipulate and analyse data in R
  • Create plots in R

Description of outcome - Competences

  • Choose the proper function, tool or features to analyse a given dataset
  • Choose the proper graph types to visualise results and data

Literature

Examples:
  • Venables, W.N., Smith, D.M. and the R Core Team (2021). An Introduction to R. url: https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf 
  • Davies, T.M. (2016). The Book of R. No Starch Press (San Francisco): 835p.

The course may use additional literature if necessary.

Teaching Method

The course will be a combination of lectures and exercises. 

Workload

Scheduled classes:

3 hours of lectures per day for 2 consecutive weeks in August.
Each three-hour session will include both lectures and exercises.

Workload:
A 5 ECTS course entails a total workload of 135 hours. These are divided between the different learning activities and below follows an estimation for the average student:
Face-to-face lectures: 30h
Preparation for lectures: 65
Preparation for exam: 38
Exam: 2h
Total: 135 hours

Examination regulations

Exam

Name

Exam

Timing

Exam: August
Reexam: September

Tests

Exam

Name

Exam

Form of examination

Written examination on premises

Censorship

Second examiner: None

Grading

7-point grading scale

Identification

Student Identification Card - Exam number

Language

English

Duration

2 hours

Examination aids

It is allowed to use class notes in physical and digital form (as PDF, Word or R scripts)

Access to the internet is not allowed. 

Assignment handover

The assignment is handed over in Digital Exam.

Assignment handin

Electronic hand-in via Digital Exam.

ECTS value

5

Additional information

The assignment is handed in as both an R script and the exam answers as a PDF/Word document. 

Re-examination

Form of examination

Oral examination

Identification

Student Identification Card - Date of birth

Preparation

The dataset is handed out one day before the exam. The questions will not be handed out before the oral exam, and there is no preperation time.

Duration

30 minutes

Examination aids

It is allowed to use class notes in physical and digital form (as PDF, Word or R scripts)

Assignment handover

Digital exam or Itslearning. 

Assignment handin

No handin.

Additional information

The reexam will be conducted online.

For the Reexam, students will have a new dataset and will have one task to perform in R. They will have to discuss how to perform the task with the teacher (10 minutes) and do it in R (20 minutes).

EKA

B540046102

External comment

Used examination attempts in the former identical course will be transferred.
Courses that are identical with former courses that are passed according to applied rules cannot be retaken.

Courses offered

Offer period Offer type Profile Education Semester

URL for Skemaplan