@examplesIf tag implements conditional examples, that do not run
R CMD check, unless some condition holds.
You can use this mechanism to avoid running some examples on CRAN and/or
R CMD check, without adding boilerplate code to the examples
themselves. The following example only runs if the computer is online:
#' @examplesIf curl::has_internet() #' curl::curl_fetch_memory("https://httpbin.org/status/200")
If you never want to run an example, use
FALSE as the condition. This
makes sense for examples that take a very long time to run:
#' @examplesIf FALSE #' some very long running computation...
@examplesIf in R6 classes you need to use the
roxygenlabs_rd roclet. E.g. add this to
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.