with_dir

0th

Percentile

Working directory

Temporarily change the current working directory.

Usage
with_dir(new, code)

local_dir(new, .local_envir = parent.frame())

Arguments
new

[character(1)] New working directory

code

[any] Code to execute in the temporary environment

.local_envir

[environment] The environment to use for scoping.

Value

[any] The results of the evaluation of the code argument.

See Also

withr for examples

setwd()

Aliases
  • with_dir
  • local_dir
Documentation reproduced from package withr, version 2.1.2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.