roxy_blocks | R Documentation |
Parses the roxygen2 package documentation of a specific R package or from a single .R
source code file.
roxy_blocks(pkg = NULL, ..., text = NULL, quiet = TRUE)
pkg , text |
Either a package name ( |
... |
Further arguments passed on to |
quiet |
Whether or not to suppress printing status output from internal processing. |
A list of roxy_block
objects.
Other package documentation functions:
enum_fn_param_defaults()
,
fn_param_defaults()
,
roxy_obj()
,
roxy_tag_value()
,
roxy_to_md_links()
# Either provide an R source file as a character vector `text`...
text <- readr::read_lines(paste0("https://raw.githubusercontent.com/r-lib/rlang/",
"db52a58d505b65f58ba922d4752b5b0061f2a98c/R/fn.R"))
pal::roxy_blocks(text = text) |> head(n = 3L)
# ...or provide a package name as `pkg`
try(
pal::roxy_blocks(pkg = "tinkr",
repos = "https://cloud.r-project.org") |>
head(n = 3L)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.