Data structures in R

BUS463 Data structures in R

  • Topics


    -Understanding data structures is the key to empowering users of R, both in understanding what is going on, in reading the scripts of others, in customising results, and in writing scripts. Data structures have developed in R over time, so that both older and newer forms are found together in most workflows. Working from the ground upwards, we will see how they may be understood, and how this understanding gives insight into the language and its use.

  • Learning outcome

    Learning outcome

    Knowledge: on successful completion, the student will be able to

    • understand basic data structures used in R programming
    • understand the role of data frames as a fundamental data container in R, and how other structures are needed for graphs
    • understand the representation of time and character encoding used in R
    • understand the development of class definition systems in R, including method dispatch
    • understand the motivations underlying the choices made among data structures in R programming
    • use this understanding in customising output of functions

    Skills: on successful completion, the student will be able to

    • assign correct descriptions to data structures used in scripts and functions encountered in simple workflows
    • define new composite data structures for workflow output, and appropriate standard methods

    General competence: on successful completion, the student will be able to

    • handle the output of R functions with greater confidence
    • customise the output of R functions to meet specific needs

  • Teaching


    This course combines lectures and programming tutorials. Lectures focus on methodological issues. In programming tutorials, the student will implement the learned methodologies using R.

  • Recommended prerequisites

    Recommended prerequisites

    Programming skills with R are helpful. However, if necessary, an additional introduction to programming with R will be offered.

  • Requirements for course approval

    Requirements for course approval

    A group project, with a presentation during the course (conditional on participant numbers)

  • Assessment


    Group term paper, based on the group project (conditional on participant numbers)

  • Grading Scale

    Grading Scale


  • Computer tools

    Computer tools

    R ( and RStudio ( and contributed packages packages as needed.

  • Semester



  • Literature


    Main book:

    • Gillespie C. & Lovelace, R. (2017) Efficient R Programming. Sebastopol, CA: O'Reilly.



    First strand:

    • Chambers, J. M. (1998) Programming with Data: A Guide to the S Language. New York: Springer. (chapter 1)
    • Chambers, J. M. (2008) Software for Data Analysis: Programming with R. New York: Springer. (chapters 1, 3, 5, 6)
    • Chambers, J. M. (2016) Extending R. Boca Raton, FL: CRC Press. (chapters 1-6, 9)

    Second strand:

    • Grolemund, G. (2014) Hands-On Programming with R. Sebastopol, CA: O'Reilly. (chapters 1, 2, 8)
    • Wickham, H. (2015) Advanced R. Boca Raton, FL: CRC Press. (chapters 1, 2, 7)
    • Wickham, H. & Grolemund, G. (2017) R for Data Science. Boca Raton, FL: CRC Press. (3, 7, 9, 10, 16)


ECTS Credits
Teaching language

Course responsible

Roger Bivand, Department of Economics