Add projr profile
projr_profile_create.Rd
Creates a new projr
profile that overrides
settings in _projr.yml
.
The profile becomes active when either the working directory
(rprojroot::is_r_package$find_file()
) or
Sys.getenv("PROJR_PROFILE")
is equal to profile
.
Usage
projr_profile_create(
profile = NULL,
method = "key",
silent = Sys.getenv("PROJR_TEST") == "TRUE"
)
Arguments
- profile
character. If not
NULL
, then this is the name of the profile. IfNULL
and the environment variablePROJR_PROFILE
is set, then made equal to its value. If the variable is not set, then made equal to the working directory.- method
"key" or "file". Specifies where the
projr
profile is specified. If "key" (default), then the additional profile is added as new keys in_projr.yml
in the formdirectories-<profile>
andbuild-<profile>
. If "file", then the file_projr-<profile>.yml
is created with all-null values for the sub-keys of thebuild
anddirectories
keys in_projr.yml
.Default is
NULL
.- silent
logical. If
TRUE
, then any messages are suppressed. Default isTRUE
is the environment variablePROJR_TEST
is"TRUE"
.
Details
Note that if any setting in projr
profile-specific setting
is empty (indicated by ~
in the YAML file by default), then
the corresponding setting in _projr.yml
is used.
If using method = "file"
, then the profile
cannot be automatically specified from the working directory
but must be specified by either PROJR_PROFILE
or the profile
argument.