9) Functions

๐Ÿ“– Lecture

This week we review the syntax used by R for writing functions.

๐ŸŽฏ Objectives

At the end of this week you will be able to:

  • Describe the main parts of a function in R (i.e. anatomy of a function)
  • Give a simple example for creating a function
  • Explain the difference between positional arguments, and named arguments
  • Provide an example for creating a โ€œbinary operatorโ€ (or infix) function

๐Ÿ“š Reading

๐Ÿ”ฌ Lab

Work writing some functions.