Skip to main content

Practice Session: Functions

Practice exercises for writing, testing, and adding error/warning messages to custom R functions.
functions
activity
beginner
practice
LearningLearning Objectives

After completing this session, you will be able to:

  • Practice creating functions
  • Practice testing functions
  • Practice adding error messages to functions

1 Overview

In this practice session you will write, test, and document your own R functions. You will start with a warm-up, then write functions that use conditionals, and finally add informative error and warning messages to your functions. You will finish by saving your work with the Git and GitHub workflow.