Learn R Programming

aisdk (version 1.1.0)

reload_env: Reload project-level environment variables

Description

Forces R to re-read the .Renviron file without restarting the session. This is useful when you've modified .Renviron and don't want to restart R.

Usage

reload_env(path = ".Renviron")

Value

Invisible TRUE if successful

Arguments

path

Path to .Renviron file (default: project root)

Examples

Run this code
# \donttest{
if (interactive()) {
# Reload environment after modifying .Renviron
reload_env()
# Now use the new keys
Sys.getenv("OPENAI_API_KEY")
}
# }

Run the code above in your browser using DataLab