| Title: | Manage Environment Variables |
|---|---|
| Description: | Get or Set Environment Variables using .Renviron configuration file. |
| Authors: | Flippie Coetser [aut, cre] (ORCID: <https://orcid.org/0000-0003-0549-9245>) |
| Maintainer: | Flippie Coetser <[email protected]> |
| License: | file LICENSE |
| Version: | 0.0.1.005 |
| Built: | 2026-05-25 09:55:29 UTC |
| Source: | https://github.com/FlippieCoetser/Environment |
Provides a suite of utility functions for managing environment variables in the .Renviron file.
This includes initialization, retrieval, caching, and clearing of environment variables, enhancing secure management of sensitive data.
Configurator()Configurator()
The Configurator function initializes and provides access to the following utility functions:
A list of utility functions that facilitate direct interactions with environment variables, structured as follows:
open.config.fileOpens or creates the .Renviron file, enabling the user to manage environment variables.
get.env.variableRetrieves the value of an environment variable by its key.
cache.env.variableTemporarily stores an environment variable value during the current R session.
clear.env.variableRemoves a cached environment variable from the current session.
# Initialize the configurator configurator <- Environment::Configurator() # Define the environment variable name and value variable.name <- 'API_KEY' variable.value <- '123456789' #' # Set an environment variable for example purposes Sys.setenv(API_KEY = variable.value) # Retrieve an environment variable variable.name |> configurator[['get.env.variable']]() # Cache an environment variable variable.name |> configurator[['cache.env.variable']](variable.value) # Clear a cached environment variable variable.name |> configurator[['clear.env.variable']]()# Initialize the configurator configurator <- Environment::Configurator() # Define the environment variable name and value variable.name <- 'API_KEY' variable.value <- '123456789' #' # Set an environment variable for example purposes Sys.setenv(API_KEY = variable.value) # Retrieve an environment variable variable.name |> configurator[['get.env.variable']]() # Cache an environment variable variable.name |> configurator[['cache.env.variable']](variable.value) # Clear a cached environment variable variable.name |> configurator[['clear.env.variable']]()
Provides a suite of utility functions for managing environment variables in the .Renviron file.
This includes initialization, retrieval, caching, and clearing of environment variables, enhancing secure management of sensitive data.
Environment.Orchestrator()Environment.Orchestrator()
The Environment.Orchestrator function initializes and provides access to the following utility functions:
A list of utility functions that facilitate direct interactions with environment variables, structured as follows:
open.config.fileOpens or creates the .Renviron file, enabling the user to manage environment variables.
get.env.variableRetrieves the value of an environment variable by its key.
cache.env.variableTemporarily stores an environment variable value during the current R session.
clear.env.variableRemoves a cached environment variable from the current session.