View source: R/documentation_to_markdown.R
documentation_to_markdown | R Documentation |
Build a list of documentation files rendered out to markdown
documentation_to_markdown(
rdfilepaths,
fragments = c("title", "usage", "description", "details")
)
rdfilepaths |
A character vector of Rd documentation file paths. |
fragments |
An optional vector of fragment tag names (such as "description", "details" or "title") to filter the Rd object tags. |
The function provides a vectorized way of extracting multiple documentation
objects at once based on paths to the .Rd files sources. The file path will
be truncated with basename
, and used as a name for the
output list. Use fragments
parameter whenever you want to limit
extracted documentation only to some parts.
A named list of character vectors of length one with the markdown content. The names are dervied from the paths, see the details for more information.
rd2markdown
get_rd
rd_file_example <- system.file("examples", "rd_file_sample.Rd", package = "rd2markdown")
rd_file_example_2 <- system.file("examples", "rd_file_sample_2.Rd", package = "rd2markdown")
# Extract full documentation for two files
rd2markdown::documentation_to_markdown(c(rd_file_example, rd_file_example_2))
# Limit to particular sections
rd2markdown::documentation_to_markdown(c(rd_file_example, rd_file_example_2),
fragments = c("details"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.