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

Exercise

Adding package documentation

In addition to the individual functions you can also document the whole package.

When you document a package you can use all of the same tags as for functions but the problem that you have is that there is no R code to document. Instead you put the keyword "_PACKAGE" underneath your package header.

You should also use the @docType and @name tags to indicate that this is package level documentation, and specify your package name.

You should then save the package documentation in the R directory in a file ending with .R with the same name as the package.

Instructions

100 XP
  • Write a package header for your datasummary package with the title "Custom Data Summaries".
  • Include the description "Easily generate custom data frame summaries".
  • Add the relevant tags required for package level documentation.
  • Ensure that the "_PACKAGE" keyword is added in the appropriate location.