Note that you can store your Crunch account info in your .Rprofile under crunch.email and crunch.pw for convenience. If you do so, you can simply login() to authenticate. For running batch jobs, this could be particularly useful. However, be warned that storing your password in a plain text file such as .Rprofile is a security risk (though perhaps less so than in every .R script you write), and we cannot officially recommend that you do so.

login(email = envOrOption("crunch.email"),
  password = envOrOption("crunch.pw"), ...)

Arguments

email

the email address associated with the user's Crunch account

password

the password associated with the user's Crunch account

...

additional parameters passed in the authentication. Not currently supported by the Crunch API.

Details

Additionally, your email and password can be stored in and read from the environmental variables R_CRUNCH_EMAIL and R_CRUNCH_PW respectively.

If a password is not supplied (or, if no arguments are supplied and only the crunch.email is specified in .Rprofile), and you are in an interactive session, you will be prompted to enter your password. At present, this is the most secure practice as your password is not stored locally.