This function returns the user default HILDA variables ("HILDAR_USER_DEFAULT_VARS")
that can be found in .Rprofile
and .Renviron
. If 'HILDAR_USER_DEFAULT_VARS' in
both files are set, the function will give higher priority to the variables set in .Rprofile.
By default, hil_fetch()
will select the variables returned by hil_user_default_vars()
in its output.
Note
To edit both files, you can use usethis::edit_r_profile()
and usethis::edit_r_environ()
.
For .Renviron
, please make sure HILDAR_USER_DEFAULT_VARS
has the following format:
For .Rprofile
, please make sure HILDAR_USER_DEFAULT_VARS
has the following format:
The main advantage of setting the variables in your .Renviron
file is
that all your new R sessions that don't have a project-specific .Rprofile
file will use the HILDAR_USER_DEFAULT_VARS
from your .Renviron
file.
However, if you have a project that requires a specific set of variables, it is
recommended that you use the .Rprofile
option.