ropensci / rAltmetric

Query and visualize metrics from altmetric.com
https://docs.ropensci.org/rAltmetric
Other
48 stars 18 forks source link

What is the correct way to query for an arXiv ID? #13

Closed pkraker closed 7 years ago

pkraker commented 9 years ago

I'd like to obtain results for an arXiv ID, such as arXiv:1312.5566. I haven't been able to get it to work though. So far, I have tried a number of combinations, but none of them worked:

What would be the correct call?

karthik commented 9 years ago

Thanks for the report @pkraker Im trying to figure out what's wrong and currently checking with the Altmetric folks. I'll get back to you shortly.

tts commented 9 years ago

I noticed your 'needs a rewrite' issue @karthik (much appreciated!) but briefly here what I found because needed some metrics like @pkraker. Found out that this call works:

altmetrics("arXiv:1305.2121")

but only if, in the paste0 function, 'arxiv' is all lowercase (currently it's 'arXiv'), see http://api.altmetric.com/docs/call_arxiv.html

if (!is.null(arXiv)) { prefix <- as.list((strsplit(arXiv, ":|/"))[[1]])[[1]] arXiv <- paste0("arxiv", "/", as.list((strsplit(arXiv, ":|/"))[[1]])[[2]]) }

karthik commented 7 years ago

Fixed