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

Exercise

Function argument documentation

When documenting a function, one crucial aspect to cover is its arguments. With roxygen2, you can achieve this using the @param tag, followed by the argument name and relevant details. You'll just document the first argument in the exercise here, but it is best practice to document each of your function arguments, so you should think about how to document the other two at a later time.

Instructions

100 XP
  • Add an appropriate tag to document the first argument of the dist_converter() function and add the following details to this tag: A numerical distance value to be converted.