object_code_documentation | R Documentation |
Using package codedoc capabilities, extract documentation blocks from your source code (using codedoc::extract_keyed_comment_blocks) to be added to the R documentation for that object.
object_code_documentation(
text_file_paths,
regex,
head = "@details",
tail = character(0L),
extract_arg_list = list(),
grepl_arg_list = list(perl = TRUE)
)
text_file_paths |
passed to codedoc::extract_keyed_comment_blocks |
regex |
regular expression used to identify which comment blocks to retain; see codedoc::extract_keyed_comment_blocks; the regex is applied to retain only those results that pertain to the keys that match the regex |
head |
these lines will be at the head of the output vector |
tail |
these lines will be at the tail of the output vector |
extract_arg_list |
additional args passed to codedoc::extract_keyed_comment_blocks, other
than |
grepl_arg_list |
additional args passed to base::grepl, other than |
so you have a roxygen block for your object you want to document. to
include programmatically generated lines into the doc, use the @eval
tag like so:
#' @eval nordcancore::object_code_documentation("R/my_script.R", "my_obj")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.