[R-pkg-devel] A simple question regarding examples

Hanyu Song h@nyu@@ong @end|ng |rom duke@edu
Thu Sep 21 02:03:11 CEST 2023


Hello,

I have a simple question about including examples. My code depends on a rarely used Python module, so I am using the @examplesIf tag per Hadley Wickham's advice as follows:

#' @examplesIf reticulate::py_module_available('ctef')
#'  res <- my_func(input1, input2)

Unfortunately, my_func runs overtime during the CRAN check. To resolve this, do I simply use the less elegant approach as follows?

#' \dontrun{
#' if (reticulate::py_module_available('ctef')) {
#' res <- my_func(input1, input2)
#' }

Thank you,
Hanyu

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list