Using \dontrun{} with @example in R

Viewed 145

In writing the documentation of my package, I include the examples in the .Rd files by calling the example codes from another folder, i.e., as follows:

#' @example ./inst/eg/example.R

However, I do not want to run them when I'm checking the code in devtools::check(). May I know how to do this with the \dontrun{} command?

I tried something like the following, but it does not work.

#' @example \dontrun{./inst/eg/example.R}

Thank you!

0 Answers
Related