drake (version 7.3.0)

drake_debug: Run a single target's command in debug mode.

Description

drake_debug() loads a target's dependencies and then runs its command in debug mode (see browser(), debug(), and debugonce()). This function does not store the target's value in the cache (see https://github.com/ropensci/drake/issues/587).

Usage

drake_debug(target = NULL, config = NULL, character_only = FALSE,
  envir = NULL, jobs = 1, replace = FALSE, verbose = TRUE)

Arguments

target

Name of the target.

config

Internal configuration list.

character_only

Logical, whether name should be treated as a character or a symbol (just like character.only in library()).

envir

Environment to load objects into. Defaults to the calling environment (current workspace).

jobs

Number of parallel jobs for loading objects. On non-Windows systems, the loading process for multiple objects can be lightly parallelized via parallel::mclapply(). just set jobs to be an integer greater than 1. On Windows, jobs is automatically demoted to 1.

replace

Logical. If FALSE, items already in your environment will not be replaced.

verbose

Logical, whether to print out the target you are debugging.

Value

The value of the target right after it is built.

See Also

drake_build()

Examples

Run this code
# NOT RUN {
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
# This example is not really a user-side demonstration.
# It just walks through a dive into the internals.
# Populate your workspace and write 'report.Rmd'.
load_mtcars_example() # Get the code with drake_example("mtcars").
# Create the master internal configuration list.
config <- drake_config(my_plan)
out <- drake_build(small, config = config)
# Now includes `small`.
cached()
head(readd(small))
# `small` was invisibly returned.
head(out)
# If you previously called make(),
# `config` is just read from the cache.
make(my_plan, verbose = FALSE)
result <- drake_build(small, config = config)
head(result)
}
})
# }

Run the code above in your browser using DataCamp Workspace