env.sub: Environment Variable Substitution

View source: R/envTools.R

env.subR Documentation

Environment Variable Substitution

Description

Perform environment variable substitution on a character string

Usage

env.sub(x)

Arguments

x

character string of length 1

Details

Performs shell-like substitution of environment variables in a character string. Expects variable syntax in the Unix format: $MY_VAR

Undefined variable names are left unexpanded.

Value

a character string with all '$' escaped environment variables replaced by their value

See Also

Sys.getenv

Examples

  file.info ( env.sub( "${HOME}/.Rprofile"))

robertdouglasmorrison/DuffyTools documentation built on April 16, 2024, 6:31 a.m.