orcid_citations {rorcid} | R Documentation |
Get citations
Description
Get citations
Usage
orcid_citations(
orcid,
put_code = NULL,
cr_format = "bibtex",
cr_style = "apa",
cr_locale = "en-US",
...
)
Arguments
orcid |
(character) Orcid identifier(s) of the form XXXX-XXXX-XXXX-XXXX. required. |
put_code |
(character/integer) one or more put codes. up to 50. optional |
cr_format |
Used in Crossref queries only. Name of the format. One of
"rdf-xml", "turtle",
"citeproc-json", "citeproc-json-ish", "text", "ris", "bibtex" (default),
"crossref-xml", "datacite-xml","bibentry", or "crossref-tdm". The format
"citeproc-json-ish" is a format that is not quite proper citeproc-json.
passed to |
cr_style |
Used in Crossref queries only. A CSL style (for text
format only). See 'get_styles()' for options. Default: apa.
passed to |
cr_locale |
Used in Crossref queries only. Language locale.
See Sys.getlocale, passed to |
... |
Curl options passed on to crul::HttpClient |
Details
This function is vectorized, so you can pass in many ORCID's, and there's an element returned for each ORCID you put in.
This function is focused on getting citations only. You can get all citations for an ORCID, or for certain works using a PUT code, or for many PUT codes.
We attempt to get citations via Crossref using rcrossref whenever possible as they are the most flexible and don't have as many mistakes in the text. If there is no DOI, we fetch the citation from ORCID.
Right now we get JSON citations back. We'd like to support bibtex format. DOI.org supports this but not ORCID.
Value
A list of results for each Orcid ID passed in, with each element named by the Orcid ID
data.frame, with the columns:
put: ORCID PUT code, identifying the work identifier in ORCID's records
id: the external identifier
id_type: the type of external identifier
format: the citation format retrieved
citation: the citation as JSON
Examples
## Not run:
(res <- orcid_citations(orcid = "0000-0002-9341-7985"))
(res2 <- orcid_citations(orcid = "0000-0002-1642-628X"))
(res2 <- orcid_citations(orcid = c("0000-0002-9341-7985", "0000-0002-1642-628X")))
# get individual works
## a single put code
(a <- orcid_citations(orcid = "0000-0002-9341-7985", put_code = 5011717))
## many put codes
(b <- orcid_citations(orcid = "0000-0002-9341-7985",
put_code = c(5011717, 15536016)))
# request other formats, Crossref only
orcid_citations(orcid = "0000-0002-9341-7985", cr_format = "turtle")
# parse citation data if you wish
# for parsing bibtex can use bibtex package or others
(res <- orcid_citations(orcid = "0000-0002-9341-7985"))
lapply(res[res$format == "csl-json", "citation"][[1]], jsonlite::fromJSON)
# lots of citations
orcid_citations(orcid = "0000-0001-8642-6325")
# example with no external identifier, returns NA's
orcid_citations(orcid = "0000-0001-8642-6325", 26222265)
## End(Not run)