Introduction to R

R is an open-source programming language for statistical computing and graphics. R is extensible, and has a large collection of high-quality user contributed packages that provides easy tools for common data analysis tasks. This mini-course will introduce you the fundamentals of R programming with a focus on data management, data visualization and quantitative finance applications in R.


What To Prepare

  • Please install R and RStudio Desktop before the first session.

    RStudio is the most popular IDE (Integrated Development Environment) for R. Most people use RStudio if they want to write some R code.

    If you encounter technical difficulties installing the software, you can instead create a free RStudio Cloud account so you can run R and RStudio in the cloud via your browser.

    An alternative to RStudio Cloud is the UofT JupyterHub/RStudio system. Go to its home page, choose the RStudio option, and click Log in to start. You will need your UTORid.

  • We will also use Google Colab, and I assume you all have a Google account.

    Google Colab lets you combine code and notes in a “notebook”. It is a great setup to get started with R programming.

    UofT JupyterHub offers a similar notebook setting. Go to its home page, choose the Jupyter Notebook option, and click Log in to start. You will need your UTORid.


Part 1 (Overview & Basics)

Part 2 (Data Manipulation)

  • Slides
  • Code
    • Data Manipulation (R notebook: )
  • Reading list
    • R for Data Science (Chapter 5 Data transformation, 12 Tidy data, and 13 Relational data.)

Part 3 (Visualization)

Part 4 (Tidymodels, Time Series and Some R Finance Packages)


Resources


Back to TDMDAL Computing Page