View source: R/cr_citation_count.r
cr_citation_count | R Documentation |
Get a citation count via CrossRef OpenURL
cr_citation_count( doi, url = "http://www.crossref.org/openurl/", key = "cboettig@ropensci.org", async = FALSE, ... )
doi |
(character) One or more digital object identifiers. If
|
url |
(character) the url for the function (should be left to default) |
key |
your Crossref OpenURL email address, either enter, or loads
from |
async |
(logical) use async HTTP requests. Default: |
... |
Curl options passed on to |
See https://www.crossref.org/labs/openurl/ for more info on this Crossref API service.
This number is also known as cited-by
Note that this number may be out of sync/may not match that that the publisher is showing (if they show it) for the same DOI/article.
We've contacted Crossref about this, and they have confirmed this. Unfortunately, we can not do anything about this.
I would imagine it's best to use this data instead of from the publishers, and this data you can get programatically :)
a data.frame, with columns doi
and count
. The count column
has numeric values that are the citation count for that DOI, or NA
if
not found or no count available
When a DOI does not exist, we may not get a proper HTTP status code to throw a proper stop status, so we grep on the text itself, and throw a stop if only one DOI passed and not using async, or warning if more than one DOI passed or if using async.
Carl Boettiger cboettig@gmail.com, Scott Chamberlain
cr_search()
, cr_r()
## Not run: cr_citation_count(doi="10.1371/journal.pone.0042793") cr_citation_count(doi="10.1016/j.fbr.2012.01.001") ## many dois <- c("10.1016/j.fbr.2012.01.001", "10.1371/journal.pone.0042793") cr_citation_count(doi = dois) # DOI not found cr_citation_count(doi="10.1016/j.fbr.2012") # asyc dois <- c("10.1016/j.fbr.2012.01.001", "10.1371/journal.pone.0042793", "10.1016/j.fbr.2012", "10.1109/tsp.2006.874779", "10.1007/bf02231542", "10.1007/s00277-016-2782-z", "10.1002/9781118339893.wbeccp020", "10.1177/011542659200700105", "10.1002/chin.197444438", "10.1002/9781118619599.ch4", "10.1007/s00466-012-0724-8", "10.1017/s0376892900029477", "10.1167/16.12.824") res <- cr_citation_count(doi = dois, async = TRUE) ## verbose curl res <- cr_citation_count(doi = dois, async = TRUE, verbose = TRUE) res ## time comparison system.time(cr_citation_count(doi = dois, async = TRUE)) system.time(cr_citation_count(doi = dois, async = FALSE)) # from a set of random DOIs cr_citation_count(cr_r(50), async = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.