search_orcid | R Documentation |
Search for ORCID based on people's names.
search_orcid( x, first.name = "FirstName", last.name = "LastName", middle.name = "MiddleName", orcid.name = "ORCID", keywords = NULL, rows = 20, clean = FALSE, save.names = TRUE )
x |
a data frame containing at least two columns: first name and last name |
first.name |
character. The name of the column containing the first name. Defaults to "FirstName". |
last.name |
character. The name of the column containing the last name. Defaults to "LastName". |
middle.name |
character. The name of the column containing the middle name (optional). Defaults to "MiddleName" |
orcid.name |
character. The name of the column containing the ORCID number (optional). Defaults to "ORCID". |
keywords |
character. one or more keywords to filter the search output, in the case of two or more ORCIDs |
rows |
integer. The number of ORCID records to return, to be passed to function rorcid::orcid_search. Defaults to 20. |
clean |
logical. Should the function return only the exact name search? Defaults to FALSE. |
save.names |
logical. Should the people's names retrieved be returned as well? Defaults to TRUE. |
If only one researcher is found the function returns a sole ORCID. If there are two or more ORCID found, all ORCID are returned separated by a pipe (i.e. "|").
The arguments 'keywords' can be used to narrow down the search if multiple IDs are found. But it will only work if the reasearchers have included keywords in their ORCID records, which is not always the case (see examples).
In addition, if argument 'clean' is TRUE, it will exclude those IDs which are not exact matches, which can be useful to remove spurious hits. Also, you may want to increase the number of results returned by each query if the names provided are too common, to make sure that the name you are searching is indeed returned in the query.
By default, the function performs queries only for missing DOIs in the in the
input column defined by orcid.name
in the object x
. It alsos returns two
new columns containing the first and last names as retrieved in ORCID, but
this option is controleed by the argument save.names
.
The package rorcid which is used internally, requires an ORCID token or that the user starts a ORCID session and authorise the package, so it can query their API. So, make sure you have one of the options ready before using the function.
the same input data frame with the missing (i.e. NA) ORCID, and optionally the corresponding names, if found.
Renato A. F. de Lima
## Not run: # Single ORCID record with the name df <- data.frame(FirstName = "Nicolas", LastName = "Casajus") search_orcid(df) # Multiple ORCID entries df <- data.frame(FirstName = "Renato", LastName = "Lima") search_orcid(df) search_orcid(df, clean = TRUE) search_orcid(df, keywords = "ecology") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.