Package Documentation

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Many times in documentation there is a lot to say, but you do not want to overwhelm the user.

To solve this we can use folding blocks in the documentation (which are then rendered into pkgdown website automatically)

To enable this feature add Roxygen: list(markdown = TRUE) to the DESCRIPTION file before rendering the roxygen2

You can use this feature by wrapping documentation with the macros

\foldstart{[SUMMARY TEXT]}

#' DOCUMENTATION
#' ...
#' DOCUMENTATION

\foldend

The SUMMARY_TEXT is optional, where the folded block will have a header of your text.

The default will display details.

These folded blocks can be inserted anywhere in the documentation, eg @description, @param, @details, @return, ....



Try the details package in your browser

Any scripts or data that you put into this service are public.

details documentation built on March 28, 2022, 1:06 a.m.