get_current_script_path {AgePopDenom}R Documentation

Get the path to the currently running script

Description

This function attempts to determine the file path of the currently executing R script. It works across multiple contexts: - In RStudio: returns the path of the active source editor tab. - In Rscript: extracts the '–file' argument used in script execution. - When sourced: uses the internal 'ofile' value.

Usage

get_current_script_path()

Value

A character string with the full path to the current script, or 'NULL' if it cannot be determined.

Examples

get_current_script_path()


[Package AgePopDenom version 1.2.2 Index]