if (FALSE) {
# Using crunch options:
set_crunch_opts(
crunch.api.account1 = "https://company1.crunch.io/api/",
crunch.api.key.account1 = "MY KEY"
)
# Or with environment variables
Sys.setenv(
"R_CRUNCH_API_ACCOUNT2" = "https://company2.crunch.io/api/",
"R_CRUNCH_API_KEY_ACCOUNT2" = "ANOTHER KEY"
)
# Can now switch between accounts
setupCrunchAuth("account1")
crunch_sitrep()
setupCrunchAuth("account2")
crunch_sitrep()
}
Run the code above in your browser using DataLab