Adds Environment Key DW_KEY to your local .Renviron file to be available on Startup.

datawrapper_auth(api_key, overwrite = FALSE)

Arguments

api_key

Required. A character string, containing the API-Key.

overwrite

Optional. Should an existing key be overwritten? Defaults to FALSE.

Value

A Message in the command line.

Note

This is a very simple function that adds the API-key to the .Renviron-file in the user's home folder. If a key already exists and the user requests to, it will get replaced.

Author

Benedict Witzenberger

Examples

if (FALSE) datawrapper_auth(api_key = "1234ABC") if (FALSE) datawrapper_auth(api_key = "1234ABC", overwrite = TRUE)