Skip to contents

Helper function to set the correct environmental variables to work with `frostr2`.

Usage

set_frost_client(
  id = NULL,
  secret = NULL,
  scope = c("session", "project", "user")
)

Arguments

id

character: Client id

secret

character: Client secret

scope

character: Scope for environmental variables. See details.

Details

In order to generate your credentials you will need to register a user with the [FROST API service](https://frost.met.no/index.html).

You can use these credentials to store a set of environmental variables (MET_FROST_ID and MET_FROST_SECRET) that will be automatically picked up by `frostr2`.

The environmental variables can be set at either a session, project or user level. Must users will typically benefit from setting environmental variables at the user level. Please note that specifying a `scope` of "project" or "user" will modify your relevant .Renviron file, so be mindful when you do this.

Examples

if (FALSE) {
# Set client for this user session
set_frost_client()

# Edit .Renviron for current working directory
set_frost_client(scope = "project")

# Edit user .Renviron
set_frost_client(scope = "user")
}