@examples
in documentation for exported functionsR/examples_roclet.R
examples_roclet.Rd
This roclet checks presence of @example
/@examples
.
Generally you will not call this function directly
but will instead use roxygen2::roxygenise()
specifying this roclet.
examples_roclet()
A roclet to be used e.g. with roxygen2::roxygenise()
Other roclets:
testthat_roclet
,
tinytest_roclet
,
param_roclet
,
return_roclet
,
namespace_roclet
,
rd_roclet
,
vignette_roclet
.
Other roclets:
param_roclet()
,
return_roclet()
,
testthat_roclet()
,
tinytest_roclet()
x <- "#' Summing two numbers\n#'\n#' @export\nf <- function(x, y) {\n x + y\n}\n"
cat(x)
#> #' Summing two numbers
#> #'
#> #' @export
#> f <- function(x, y) {
#> x + y
#> }
roxygen2::roc_proc_text(examples_roclet(), x)
#> Functions with @export but no @example(s):
#> * Function 'f()' with title 'Summing two numbers'
#> NULL