save_token: Save token to file

Description Usage Arguments Note Examples

View source: R/utils.R

Description

save_token saves the DNB token to file, so the user does not to enter it for each R session.

Usage

1
2
save_token(token = dnb_token(), path = paste(normalizePath("~/"),
  ".Renviron", sep = "/"))

Arguments

token

the personal DNB token as string.

path

the path to the file where the token is stored. Default is the .Renvion file in the users home directory.

Note

If an environment variable named "DNB_TOKEN" is found in the file, it is updated to the given token.

Examples

1
2
3
4
## Not run: 
save_token(token="YOUR_TOKEN_HERE")

## End(Not run)

rdnb documentation built on Sept. 21, 2018, 6:28 p.m.