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
, ....
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.