gargle_options: Options consulted by gargle

Description Usage Arguments gargle_oauth_email gargle_oob_default gargle_oauth_cache gargle_verbosity Examples

Description

Wrapper functions around options consulted by gargle, which provide:

If the built-in defaults don't suit you, set one or more of these options. Typically, this is done in the .Rprofile startup file, with code along these lines:

1
2
3
4
options(
  gargle_oauth_email = "jane@example.com",
  gargle_oauth_cache = "/path/to/folder/that/does/not/sync/to/cloud"
)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

Arguments

level

Verbosity level: "debug" > "info" > "silent"

env

The environment to use for scoping

code

Code to execute with specified verbosity level

gargle_oauth_email

gargle_oauth_email() returns the option named "gargle_oauth_email", which is undefined by default. If set, this option should be one of:

gargle_oob_default

gargle_oob_default() returns the option named "gargle_oob_default", falls back to the option named "httr_oob_default", and eventually defaults to FALSE. This controls whether to prefer "out of band" authentication. We also return FALSE unconditionally on RStudio Server or Cloud. This value is ultimately passed to httr::init_oauth2.0() as use_oob. If FALSE (and httpuv is installed), a local webserver is used for the OAuth dance. Otherwise, user gets a URL and prompt for a validation code.

Read more about "out of band" authentication in the vignette Auth when using R in the browser.

gargle_oauth_cache

gargle_oauth_cache() returns the option named "gargle_oauth_cache", defaulting to NA. If defined, the option must be set to a logical value or a string. TRUE means to cache using the default user-level cache file, ~/.R/gargle/gargle-oauth, FALSE means don't cache, and NA means to guess using some sensible heuristics.

gargle_verbosity

gargle_verbosity() returns the option named "gargle_verbosity", which determines gargle's verbosity. There are three possible values, inspired by the logging levels of log4j:

Examples

1
2
3
4

gargle documentation built on July 2, 2021, 5:07 p.m.