First you need to install the following required R packages:
installed_packages <- rownames(installed.packages())
### For installing an R package from Github
if(!"devtools" %in% installed_packages) {
install.packages("devtools", repos = "https://cloud.r-project.org")
}
### R package for checking ORCID use at KWB
if(!"kwb.orcid" %in% installed_packages) {
devtools::install_github("KWB-R/kwb.orcid")
}
Either check in interactively with rorcid::orcid_auth()
(opens) or provide a valid orcid_token
### If no "orcid_token" is specified in:
### Sys.setenv("orcid_token" = "my_secret_orcid_token")
### it opens up the web browser for login to ORCID in order to create a
### authentication token
rorcid::orcid_auth()
### After finishing this step the token is printed to the console, e.g.
> "Bearer my_secret_orcid_token"
### To make this token available in the next R session make sure to set the
### token via Sys.setenv() as shown below
Sys.setenv("orcid_token" = "my_secret_orcid_token")