Loading Events

« All Events

  • This event has passed.

Intermediate R: Best Practices for Writing R Scripts

January 30 @ 10:00 am - 12:00 pm

Register Now

This workshop is offered in person in DataLab’s classroom in Shields Library. A Zoom broadcast option is also available. Advance registration required: https://reservations.library.ucdavis.edu/event/11931823


This intermediate R workshop is all about making it easier to run, reuse, and share R code by writing scripts! We’ll cover what scripts are, how to organize code in a script, how to make scripts executable, how to handle inputs and outputs, and how to reuse functions from one script in another. In order to make sure you and others you share your scripts with can run them, we’ll also cover how to manage installed packages and their versions with R’s built-in functions and the “renv” package. The workshop will end with a brief discussion of what to do next if you want to turn your scripts into fully-fledged R packages.

This workshop is NOT an introduction to R and is intended for motivated intermediate to advanced learners from all domains at UC Davis who want to hone their R skills. Please make sure you meet the prerequisites before registering as we will be unable to answer introductory R questions during this session. (Want to brush up on R? Check out our R Basics 4-part introductory series.)


After completing this workshop, learners should be able to:
– Create executable R scripts;
– Organize scripts according to best practices;
– Modify scripts to accept input via command line arguments;
– Modify code to log output to the console or a file;
– Create loops to run repetitive or iterative code;
– Use R’s built-in functions to maintain installed packages;
– Use the “renv” package to control package versions;


Participants must have taken DataLab’s “R Basics” workshop series and/or have prior experience using R, be comfortable with basic R syntax, and have the latest versions of R and RStudio pre-installed and running on their laptops.


Nick Ulle is a statistician and computer scientist. Prior to DataLab he was a visiting assistant professor of Statistics at UC Berkeley, where he designed and taught courses in data science. During his PhD in Statistics at UC Davis, he developed source code analysis techniques for the R programming language. His research interests include statistical computing, programming languages, data visualization, and pedagogy.


January 30
10:00 am - 12:00 pm
Event Category:
Event Tags:
, , , , , ,




DataLab: Data Science and Informatics (DSI)


Shields Library, room 360