Creating Functions in R
intermediate
Take your coding skills to the next level by incorporating your own functions in your analysis.
Image credit: rforecology.com
Description
Functions allow you to break your code into small, reusable modules. In this lesson, we will review the advantages of coding with functions, practice creating some functions and show how to call them, and then do some exercises to build other simple functions.
Prerequisites
- Intermediate R and RStudio user
- Basic understanding of
ggplo2
Learning Goals
- Explain why we should write code in small functions
- Write code for one or more functions
- Document functions to improve understanding and code communication
Duration
1 hour