Learn R Programming

envDocument (version 2.4.1)

getScriptInfo: Get information about the calling script

Description

getScriptInfo retrieves the file path and modification time for the calling script.

Usage

getScriptInfo()

Arguments

Details

Note: Currently this works if the script was called via source(), knitr::spin(), Rstudio's _compile notebook_ (ctrl-shift-K), Rscript or R -f.

Examples

Run this code
# NOT RUN {
script_info <- getScriptInfo()
# }

Run the code above in your browser using DataLab