Learn R Programming

options (version 0.2.0)

naming_formats: Naming Convention Formatters

Description

This family of functions is used internally to generate global option and environment variable names from the package name and internal option name.

Usage

option_name_default(package, option)  # "package.option"

envvar_name_default(package, option) # "R_PACKAGE_OPTION"

envvar_name_generic(package, option) # "PACKAGE_OPTION"

Value

A character value to use as the global option name or environment variable name

Arguments

package, option

The package name and internal option name used for generating a global R option and environment variable name. As these functions are often provided as values, their arguments rarely need to be provided by package authors directly.

Functions

  • option_name_default(): A default naming convention, producing a global R option name from the package name and internal option name (mypackage.myoption)

  • envvar_name_default(): A default naming convention, producing an environment variable name from the package name and internal option name (R_MYPACKAGE_MYOPTION)

  • envvar_name_generic(): A generic naming convention, producing an environment variable name from the package name and internal option name. Useful when a generic convention might be used to share environment variables with other tools of the same name, or when you're confident that your R package will not conflict with other tools. (MYPACKAGE_MYOPTION)

See Also

naming