knitr::opts_chunk$set(echo = TRUE)
3 packages are needed to create automaticall short documentation for each function
library(devtools) # Contain function document() library(roxygen2) # Create automatical documentation
The last package Rtools must be downloading with this link : Package
The template gives an example of the minimal information for each function.
Different sections begin by @something and sections can be in different order except for the first two sections (short resume of function and the explanation of the function)
Tips :
* Start a line
#'
#'\emph{}
#'\string{}
#'\code{}
#'\cr
#'\itemize #' @return zoo #' \itemize{ #' \item Wet #' \item Normal #' \item Dry #' }
Problem
#'\% replace %
More informations are available on different website :
R package
Mastering Software Development in R
Text formatting reference sheet
Learning more about Markdown
devtools::document()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.