Skip to contents

Writes key pairs to .Renviron / .Rprofile and adds .Renviron to .gitignore if not already there.

Usage

creds_to_renviron(
  ...,
  scope = c("user", "project")[1],
  overwrite = FALSE,
  proj_dir = ".",
  rprofile = FALSE
)

Arguments

...

named keys to write

scope

chr Edit globally for the current user, or locally for the current project

overwrite

(lgl) should an existing key pair be overwritten. Default: FALSE

proj_dir

(chr) project directory to write credentials to

rprofile

(lgl) whether to write the keypairs to a options call in a .Rprofile file instead.

Value

success message if a value is written