It has become a practice to store configuration parameters related
to a project, in a hidden file called .env
, in the working
directory of a project, and then set them as environment variables.
This package loads the variables defined in the .env
file
in the current working directory (as reported by getwd
),
and sets them as environment variables.
This happens automatically when the dotenv
package is loaded,
so the typical use-case is to just put a 'library(dotenv)' code at the
beginning of your R script.
Alternatively a dotenv::load_dot_env()
call can be used
to load variables from arbitrary files.
The format of the .env
file is also a valid unix shell
file format, so e.g. in bash
the environment variables
can also be set by running source .env
.
See load_dot_env
for the exact file format.
load_dot_env
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.