Functions
- Explain why you might want to write a collection of functions to perform tasks related to a single object.
- Describe good coding conventions for writing functions for:
- the same kind of object
- the same kind of task
Sourcing a File
- Compare and contrast an R Markdown file and an R script.
- Create an R script in RStudio.
- Give the file suffix for R Markdown files and R scripts.
- Source functions from an R script using
source()
.
Function Documentation
- Explain why you should always (yes, always) write documentation for a function you write.
- State the three things (at the very least) you should document when writing a function header.
- Use roxygen-style formatting (that’s the
#'
stuff) to write header comments for a given function.