modifyPathString: System path string handlers

Description Usage Arguments Value Functions Note Examples

Description

System path string handlers

Usage

1
2
3
4
5
addToPathEnd(x, var = "PATH")

addToPathStart(x, var = "PATH")

removeFromPath(x, var = "PATH")

Arguments

x

character. Elements to add to the system path string defined in var.

var

character(1). System environment variable name. Hands off to Sys.getenv and Sys.setenv internally. Intended for use with "PATH", "FPATH", "MANPATH", etc.

Value

Invisible character(1). Path string.

Functions

Note

Updated 2021-08-23.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
x <- c("/usr/local/bin", "/usr/bin")
var <- "TESTPATH"
Sys.unsetenv(var)

addToPathEnd(x = x, var = var)
Sys.getenv(var)

removeFromPath(x = x, var = var)
Sys.getenv(var)

addToPathStart(x = x, var = var)
Sys.getenv(var)

acidgenomics/AcidBase documentation built on Sept. 10, 2021, 1:27 a.m.