inst/extdata/somescript.R

#!/usr/bin/env Rscript

cat("Directory this script invoke is:\n")
cat(getwd())
cat("\n")

library(rconf)
dscript <- rconf::setpwd()

cat("Directory this script located:\n")
cat(getwd())
cat("\n")

cat("Directory this script invoke is:\n")
cat(dscript)
cat("\n")

cat("Directory after setpwd called:\n")
cat(getwd())
cat("\n")
obarisk/rconf documentation built on May 3, 2019, 9:01 p.m.