Skip to main content Link Menu Expand (external link) Left Arrow Right Arrow Document Search Copy Copied

Workshop Title Slide

Introduction to R Programming

R has a powerful suite of high-level statistical functions, but sometimes you need lower-level control over the functionality of your script. No prior knowledge of R is required. In this workshop, you will learn how to write programs in R using functions and control flow. We will cover variables, data types, functions, conditional blocks, loops, and debugging.

This workshop is offered by the Data Analysis Support Hub (DASH). Get in touch with DASH.


  • A local installation of R and RStudio (this will be covered in the Preparation page)

Learning Objectives

By the end of this workshop, you will be able to:

  • Understand what R is and what it can be used for
  • Work with R’s atomic data structures
  • Use collections to store data
  • Control the flow of a program using conditional statements and loops
  • Create and use functions


This module will take around 1 to 2 hours, however feel free to work at your own pace!

Land Acknowledgement

McMaster University is situated in Ohròn:wakon which is the traditional territories of the Erie, Neutral, Huron-Wendat, Haudenosaunee and Mississaugas. This land is covered by the “Dish With One Spoon Wampum Belt Covenant”, an agreement between the Haudenosaunee confederacy and Anishinaabe nations to ensure those who live here take only what they need, leave enough in the dish for others, and keep the dish clean. This land is also covered by the Between the Lakes Treaty of 1792 and is very close to the 1784 Haldimand Treaty, which holds the land six miles to each side of the Grand River as a tract for Six Nations, which is currently not being honored.

Many of us at the Sherman Centre took the First Nations’ Information Governance Centre’s OCAP course this past year which stands for Ownership, Control, Access, and Possession. We encourage you to learn more about OCAP and Indigenous data management practices more broadly, including the OCAS principles endorsed by the Manitoba Métis Federation, the principles of Inuit Qaujimajatuqangit, ᐃᓄᐃᑦ ᑕᐱᕇᑦ ᑲᓇᑕᒥ (Inuit Tapiriit Kanatami) National Inuit Strategy on Research, and Global Indigenous Data Alliance’s CARE principles.