tests/test_import/module_chdir/module_chdir.R

# This variable is set when the script is sourced, so that
# the .chdir parameter can be tested.
directory_of_sourcing <- getwd()

fun_chdir_report <- function() {
  paste0("Module was sourced in: ",directory_of_sourcing)
}

Try the import package in your browser

Any scripts or data that you put into this service are public.

import documentation built on Sept. 24, 2023, 1:08 a.m.