50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

rdoc (version 0.1.0)

rdoc_rd: Colourised R documentation

Description

Refer directly to .Rd file contents as terminal output.

Usage

rdoc_rd(path)

Arguments

path

character(1), the path to an .Rd file

Details

The manner in which content is outputted depends on where it is being used. If used from a terminal the contents will be outputted via file.show. Otherwise the output will be printed interactively by sections unless this has been disabled via options(rdoc.by_section = FALSE). When printing by section pressing the <enter> keypress will show the next section. Any other keypress will exit the interaction without printing any remaining sections. Color support is checked via crayon::has_color(). Customising rdoc output is possible via `options`, see rdoc_options for more details.

Examples

Run this code
# NOT RUN {
d <- system.file('extdata/rdoc_test.Rd', package = "rdoc")
rdoc::rdoc_rd(d)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab