Getting Started with R: Loops and Functions

Thursday, September 17, 2026
10:00am to 12:00pm
Lenovo Esports and Gaming Lab, Hunt Library

Register for this workshop

About This Workshop

This workshop introduces the tools needed to write repeatable, efficient code. It is designed for anyone interested in writing their own code in R for simple tasks. By the end of this workshop, you will understand the differences between base R functions, functions in packages and user-defined functions. You will see how to install, load and call functions in R packages.  You will be able to identify the basic parts and purpose of built-in and user-defined functions and be able to define your own function. You will learn about conditional and flow statements and know how to use them. This workshop incorporates hands-on work, and there will be plenty of time for questions. Installing R and RStudio is not required for this workshop. We will work in a remote environment that will allow us to work in R without having to have R and RStudio installed on your personal machine.

Needed for attendees: Please bring your laptop, or arrange to borrow a laptop from the Libraries.

 

Learning Outcomes

By the end of this Session, you will understand:

  • The three types of functions
  • The anatomy of a function
  • How to install and use R Libraries
  • How to use documentation, get help in RStudio
  • How to import and save data
  • How to use and write an if statement
  • How to use and write a for loop
  • How to use and write a while loop

When

Thursday, September 17, 2026
10:00am to 12:00pm
Add to calendar 2026-09-17 10:00:00 2026-09-17 12:00:00 Getting Started with R: Loops and Functions <p>This workshop introduces the tools needed to write repeatable, efficient code. It is designed for anyone interested in writing their own code in R for simple tasks. By the end of this workshop, you will understand the differences between base R functions, functions in packages and user-defined functions. You will see how to install, load and call functions in R packages.&nbsp; You will be able to identify the basic parts and purpose of built-in and user-defined functions and be able to define your own function. You will learn about conditional and flow statements and know how to use them.&nbsp;This workshop incorporates hands-on work, and there will be plenty of time for questions.&nbsp;Installing R and RStudio is not required for this workshop. We will work in a remote environment that will allow us to work in R without having to have R and RStudio installed on your personal machine.</p> <p>Needed for attendees: Please bring your laptop, or arrange to borrow a laptop from the Libraries.</p> <p>&nbsp;</p> Learning Outcomes <p>By the end of this Session, you will understand:</p> The three types of functions The anatomy of a function How to install and use R Libraries How to use documentation, get help in RStudio How to import and save data How to use and write an if statement How to use and write a for loop How to use and write a while loop Lenovo Esports and Gaming Lab at the

Where

Lenovo Esports and Gaming Lab, Hunt Library

Register

Register for this workshop

Accessibility

If assistive technology, live captioning, or other accommodations would improve your experience at this event, please contact us. We encourage you to contact us early about this to allow sufficient time to meet your access needs.

Contact Information