Learn R Programming

parallelly (version 1.25.0)

getOptionOrEnvVar: Gets an R Option or an Environment Variable

Description

Gets an R Option or an Environment Variable

Usage

getOptionOrEnvVar(name, default = NULL, envvar = NULL)

Arguments

name

(character string) The name of the R option.

default

(a single object) The value to be returned if neither the R option nor the environment variable is set. If the environment variable is set, its value is coerced to the same type as default.

envvar

(character string) The name of the environment variable. If not set, or NULL, then the name is automatically constructed from the upper-case version of argument name with periods (.) substituted by underscores (_) and prefixed with R_, e.g. with "abc.debug" becomes R_ABC_DEBUG.

Value

Returns an object.