Note that you can store your Crunch account info in encrypted format via
the keyring package, with key_set(service = "crunch", "<USERNAME>", ...)
If you do so, you can simply login()
to authenticate. For running batch jobs,
this could be particularly useful.
login(email = NULL, password = NULL, ...)
the email address associated with the user's Crunch account
the password associated with the user's Crunch account
additional parameters passed in the authentication. Not currently supported by the Crunch API.
Your email and password can also be stored in and read from the
environmental variables R_CRUNCH_EMAIL
and R_CRUNCH_PW
,
or from your .Rprofile under crunch.email
and crunch.pw
.
However, environmental variables and .RProfile
files are not encrypted, so
this practice is no longer recommended. If an email or password is found in
multiple locations, priority is given to 1) environmental variables, 2)
.RProfile
, and 3) keyring. This order of priority is for backwards compatibility,
and methods 1) and 2) are no longer recommended.
If a password is not stored in any of these locations, and you are in an interactive session, you will be prompted to enter your password.