tests/testthat/current_source_filename.R

if (file.exists("../../DESCRIPTION")) {
  devtools::load_all("../../", quiet = T)
} else {
  library("scriptName")
}
str(current_source_filename())

Try the scriptName package in your browser

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

scriptName documentation built on June 19, 2019, 9:03 a.m.