For using it in R first you have to have:
-
Optionally having a R Studio.
For a .env
file like this:
# Install package if not installed yet
if (!require("dotenv")) install.packages("dotenv")
require("dotenv")
load_dot_env(".env")
DB_NAME <- Sys.getenv("DB_NAME")
print(DB_NAME)