best practices

An introduction to using functions in R

Note: Here you will find the raw RMarkdown file for this post, in case you want to follow along and execute the code yourself! Introduction R is considered to be a functional programming language. What this means is that the syntax and rules of the language are most effective when you write code built around the use of functions. Functions allow you to modularize code, thereby isolating different blocks in a way that makes your code more generalized, reuseable, readable and easier to debug.