optOrEnvVar retrieves that value assocaited with the name provided as an argument, prioritizing in its search by first interpreting the given argument as an R option name, and then trying an interpretation as an environment variable if and only if the R option is not set or is an empty string or vector.

optOrEnvVar(name)

Arguments

name

The name of the option or env var to fetch

Value

The value associated with the given name, returning NULL if and only if the name is set neither as an option nor as environment variable.