View source: R/roc_eval_functions.R
roc_eval_text | R Documentation |
roc_eval_text
is an upgraded version of roc_proc_text
that evaluates inline and block code before generating Rd.
roc_eval_text(roclet, input)
roclet |
Name of roclet to use for processing. |
input |
Source string |
List with names as fun_name.Rd
, where each element is the RoxyTopic
for
the corresponding function, same as the return of roc_proc_text
.
Change log:
0.1.0 Xiurui Zhu - Initiate the function.
Xiurui Zhu
# Formulate a text version of a function with documentation
fun_text <- '
#\' \\code{iris} is a `r nrow(iris)`-row matrix.
#\'
#\' \\code{iris} matrix has
#\' ```{r results="hold"}
#\' ncol(iris)
#\' ```
#\' columns.
print_iris <- function() iris
'
# Parse the 'roxygen' comments to Rd documentation
roc_eval_text(roxygen2::rd_roclet(), fun_text)[[1L]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.