Sys.path: Returns the path of the current program

View source: R/file_functions.R

Sys.pathR Documentation

Returns the path of the current program

Description

A function that gets the full path of the currently running program. If the function fails to retrieve the path for some reason, it will return a NULL. The function takes no parameters.

Credit for this function goes to Andrew Simmons and the this.path package.

Usage

Sys.path()

Value

The full path of the currently running program, or a NULL.

See Also

Other fileops: dir.find(), file.find()

Examples

# Get current path
pth <- Sys.path()
pth
# [1] "C:/programs/myprogram.R"

common documentation built on Sept. 29, 2022, 9:06 a.m.