R Programming for Data Science

BAN400 R Programming for Data Science

Spring 2024

Autumn 2024
  • Topics

    R is among the most powerful and widely used programming languages for data analysis in both science and businesses. R is a free open source tool, and new packages and functionalities are continuously being added.

    The course is intended for students without prior experience with R or other programming languages. The course is split in two main parts. In the first part, you will learn that basics of R programming, by

    • settting up your own R programming environment on your personal computer using Rstudio,
    • learning how to write, execute and modify R code and R scripts,
    • loading data sets into R, createing effective numerical and graphical summary statistics, and seeing how to use R to perform some common statistical analyses, and
    • using programming techniques such as loops, conditionals and functions, to effectively solve practical and analytical issues that we encounter when working with data.

    In the second part, you will dive deeper into selected topics in the application of R for solving common data science problems. You will carry out complete empirical projects from data collection to end product using modern tools from the R ecosystem. After successfully completing the course, you will be able to use R as your analytical tool to solve various problems in your academic and professional life.

  • Learning outcome

    Knowledge: On successful completion, the student

    • understands the importance and usefulness of R as a tool in data analysis
    • understands the importance of reproducibility in data analysis.
    • understands the importance of documentation when creating scripts.

    Skills: On successful completion, the student can

    • read and understand documentation of packages and functions.
    • use basic data structures (lists, arrays, matrices, vectors, and data frames) as appropriate.
    • combine, merge and reshape data sets in R.
    • independently resolve warnings, errors, and other basic programming issues.
    • use functions, loops, assignments, subsetting, and conditionals in an R-script.
    • use vectorization, iterations, and parallelization as needed for computationally demanding tasks.
    • write documented and standardized, formatted code as part of code development.
    • use R to program and apply selected prediction and machine learning methods and correctly interpret the output in the relevant context.
    • create and export convincing tables and figures for use in reports and presentations.
    • apply R to empirical business and economics problems.

    General competence: On successful completion, the student can

    • work efficiently in R and RStudio.
    • conduct reproducible data analysis with R.

  • Teaching

    Plenary tutorials and project work.

  • Recommended prerequisites

    Basic statistical competence equivalent to MET2

  • Credit reduction due to overlap

    There is a full credit reduction between BAN400 and the 2,5 ECTS seminar BAN420, which is no longer offered. This means that if you have already passed BAN420 and complete BAN400 at a later point, you will be awarded a total of 7,5 ECTS for the two courses combined.

  • Compulsory Activity

    There will be weekly assignments throughout the semester that must be completed and approved for course approval.

  • Assessment

    Three-day, individual home exam. The three-day take-home exam is held between 09:00 on the first day of examination and 14:00 on the third day of examination.

  • Grading Scale

    A-F

  • Computer tools

    R, RStudio

  • Literature

    R for Data Science by Hadley Wickham, available at https://r4ds.had.co.nz/

    Shorter articles posted on Canvas.

Overview

ECTS Credits
7.5
Teaching language
English
Semester

Autumn. Will be offered Autumn 2023.

Course responsible

Associate Professor Håkon Otneim, Department of Business and Management Science (main course responsible).

Adjunct Associate Professor Ole-Petter Moe Hansen, Department of Business and Management Science.