1. Learn
  2. /
  3. Courses
  4. /
  5. Creating R Packages

Exercise

Documenting function arguments

One of the most important aspects of a function to document are the arguments.

With roxygen you do this with the @param tag. You follow the tag with the argument name and then any details the user needs to know.

If there is a lot of information that you need to provide about an argument you might want to consider putting this in the details section instead.

Normally you must document every argument of your function, but in this exercise you'll just document the first argument and come back to the second one later!

Instructions

100 XP
  • Add an appropriate tag to document the first argument of the numeric_summary() function.
  • Add the following details to this tag: "a numeric vector containing the values to summarize."