Skip to contents

Writes API_USGS_PAT to ~/.Renviron and applies it immediately in the current session. The same variable is used by the dataRetrieval package, so one key covers both packages.

Usage

set_nims_key(key)

Arguments

key

A single non-empty character string containing your API key.

Value

key, invisibly.

Details

Register for a free key at https://api.waterdata.usgs.gov/signup/.

Examples

if (FALSE) { # \dontrun{
set_nims_key("my_api_key_here")
} # }