if (FALSE) {
# Assuming an `.env` file with the following content:
# DB_HOST=localhost
# DB_USER=root
# DB_PASS="secret"
env_vars <- read_env(".env")
print(env_vars)
# Should output something like:
# $DB_HOST
# [1] "localhost"
# If no path is given, it defaults to `.env` in the current directory.
env_vars <- read_env()
}
Run the code above in your browser using DataLab