From dd0975345042a2c7345283318fc7d767c8f01e4f Mon Sep 17 00:00:00 2001 From: orgadish <48453207+orgadish@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:33:01 -0800 Subject: [PATCH] Added pkgload::run_example() to the documentation for devtools::run_examples(). --- R/run-examples.R | 5 ++++- man/run_examples.Rd | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/R/run-examples.R b/R/run-examples.R index cfc87fd72..2c6068bfc 100644 --- a/R/run-examples.R +++ b/R/run-examples.R @@ -11,7 +11,8 @@ #' name of `Rd` file to start with (with or without extensions), or #' a topic name. If omitted, will start with the (lexicographically) first #' file. This is useful if you have a lot of examples and don't want to -#' rerun them every time you fix a problem. +#' rerun them every time you fix a problem. To run only one example, use +#' [pkgload::run_example()]. #' @family example functions #' @param show DEPRECATED. #' @param fresh if `TRUE`, will be run in a fresh R session. This has @@ -21,6 +22,8 @@ #' @param document if `TRUE`, [document()] will be run to ensure #' examples are updated before running them. #' @keywords programming +#' +#' @seealso [pkgload::run_example()] to run a single example. #' @export run_examples <- function(pkg = ".", start = NULL, show = deprecated(), run_donttest = FALSE, run_dontrun = FALSE, fresh = FALSE, document = TRUE, diff --git a/man/run_examples.Rd b/man/run_examples.Rd index 918e991e1..81fdbc075 100644 --- a/man/run_examples.Rd +++ b/man/run_examples.Rd @@ -24,7 +24,8 @@ package object. See \code{\link[=as.package]{as.package()}} for more informatio name of \code{Rd} file to start with (with or without extensions), or a topic name. If omitted, will start with the (lexicographically) first file. This is useful if you have a lot of examples and don't want to -rerun them every time you fix a problem.} +rerun them every time you fix a problem. To run only one example, use +\code{\link[pkgload:dev_example]{pkgload::run_example()}}.} \item{show}{DEPRECATED.} @@ -48,5 +49,8 @@ examples to pass - whenever one fails you need to fix the problem and then restart the whole process. This function makes it a little easier by making it possible to run all examples from an R function. } +\seealso{ +\code{\link[pkgload:dev_example]{pkgload::run_example()}} to run a single example. +} \concept{example functions} \keyword{programming}