Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

load_options

Load roxygen2 options


Description

Options can be stored in the Roxygen field of the DESCRIPTION, or in man/roxygen/meta.R. In either case, the code is parsed and evaluated in a child of the base environment. Call roxy_meta_get() to access current option values from within tag and roclet methods.

Options in man/roxygen/meta.R override those present in DESCRIPTION.

Usage

load_options(base_path = ".")

roxy_meta_get(key = NULL, default = NULL)

Arguments

base_path

Path to package.

Possible options

  • roclets <character>: giving names of roclets to run. See roclet_find() for details.

  • packages <character>: packages to load that implement new tags.

  • load <string>: how to load R code. See load for details.

  • old_usage <flag>: use old style usage formatting?

  • markdown <flag>: translate markdown syntax to Rd?

  • r6 <flag>: document R6 classes?

  • current_package <string> (read only): name of package being documented.

  • rd_family_title <list>: overrides for @family titles. See the rd vignette for details: vignette("rd", package = "roxygen2")

How to set

Either set in DESCRIPTION:

Roxygen: list(markdown = TRUE, load = "installed")

Or if longer, you can put in /man/roxygen/meta.R:

list(
  markdown = TRUE,
  load = "installed"
)

roxygen2

In-Line Documentation for R

v7.1.1
GPL (>= 2)
Authors
Hadley Wickham [aut, cre, cph] (<https://orcid.org/0000-0003-4757-117X>), Peter Danenberg [aut, cph], Gábor Csárdi [aut], Manuel Eugster [aut, cph], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.