R/set_smap_credentials.R
set_smap_credentials.Rd
To use smapr, users need to provide NASA Earthdata portal credentials. This function allows users to interactively set these credentials via the user's Earthdata username and password.
set_smap_credentials(username, password, save = TRUE, overwrite = FALSE)
A character string of your Earthdata portal username
A character string of your Earthdata portal password
Logical: whether to save your credentials to your
.Renviron file (e.g., ~/.Renviron). Previous Earthdata credentials will not
be overwritten unless overwrite = TRUE
.
Logical: whether to overwrite previous Earthdata credentials
in your .Renviron file (only applies when save = TRUE
)
A data.frame with the names of the data files, the remote directory, and the date.
If you do not yet have a username and password, register for one here: https://urs.earthdata.nasa.gov/
A warning: do not commit your username and password to a public repository! This function is meant to be used interactively, and not embedded within a script that you would share.
if (FALSE) {
set_smap_credentials('myusername', 'mypassword')
}