Functions and Iteration in R

Do you find yourself copying and pasting blocks of code? Do you sometimes need to do the same task 5, 50, or 500 times?

In R, we perform such repetitive tasks through the use of functions and iteration (loops).

This workshop will teach you the basics of function writing to turn existing code procedures into functions, and return multiple and conditional values. We will then learn how to apply these functions we have written to series of data to perform tasks like calculating the standard error of each column in a dataframe, run simulations, and write and read files. We will also discuss how to parallelize iterative processes on the SSCC Slurm cluster.

Class materials are available at https://sscc.wisc.edu/sscc/pubs/r_programming/.

This intermediate-level workshop assumes you know the fundamentals of working with data in R, such as you can get from our Data Wrangling in R workshop or online curriculum (https://sscc.wisc.edu/sscc/pubs/dwr/).

Instructor: Struck
Room: 3218 Sewell Social Sciences Building
Date: 2/6
Time: 9:00 - 12:00

 

SSCC Members click here to register
Non-Members, please fill out the following:
Name:
UW Email Address:
Primary Department:
School/College:
Status: