powered by
getScriptInfo retrieves the file path and modification time for the calling script.
getScriptInfo
getScriptInfo()
Note: Currently this works if the script was called via source(), knitr::spin(), Rstudio's _compile notebook_ (ctrl-shift-K), Rscript or R -f.
# NOT RUN { script_info <- getScriptInfo() # }
Run the code above in your browser using DataLab