Closed zackbatist closed 5 years ago
I'm open to accepting a pull request if you want to implement it.
If not, I will get to it maybe around 3-4 months. Does Scopus provide Bibtex outputs? Please indicate which API https://dev.elsevier.com/sc_apis.html and which endpoint https://dev.elsevier.com/api_docs.html provide that. What query are you using that are giving you results? Maybe also look at the raw JSON
Looked at their code and adapted. Try bibtex_core_data
after installing new rscopus
from github.
See example
library(rscopus)
x = abstract_retrieval("S1053811915002700", identifier = "pii",
verbose = FALSE)
res2 = bibtex_core_data(x)
cat(res2)
#> @article{Muschelli2015Validatedimages,
#> author = {John Muschelli and Natalie L. Ullman and W. Andrew Mould and Paul Vespa and Daniel F. Hanley and Ciprian M. Crainiceanu},
#> title = {Validated automatic brain extraction of head CT images},
#> journal = {NeuroImage},
#> year = {2015},
#> volume = {114},
#> number = {},
#> pages = {379-385},
#> doi = {10.1016/j.neuroimage.2015.03.074}}
Created on 2019-02-28 by the reprex package (v0.2.1)
Thank you so much! Will try it out once it gets pushed to github.
Pushed.
I encounter some problem here:
library(rscopus)
api_key = get_api_key(NULL, error = FALSE)
if (!is.null(api_key)){
x = abstract_retrieval("S1053811915002700", identifier = "pii",
verbose = FALSE)
res = bibtex_core_data(x)
cat(res)
x = abstract_retrieval("S1053811915002700", identifier = "pii",
verbose = FALSE)
res2 = bibtex_core_data(x)
cat(res2)
}
#> @article{}@article{}
Created on 2019-12-28 by the reprex package (v0.3.0)
Are you sure you're on the necessary IP?
What is the output of
res = rscopus::elsevier_authenticate()
res$auth_type
If this is "GUEST"
, then the bibtex_core_data
may not work.
Try updated GitHub package:
remotes::install_github("muschellij2/rscopus")
The issue is that if you're a guest, the authors data is not there:
library(rscopus)
x = abstract_retrieval("S1053811915002700", identifier = "pii",
verbose = FALSE)
res2 = bibtex_core_data(x)
#> Warning in bibtex_core_data(x): Most likely not fully authenticated, see
#> rscopus::elsevier_authenticate() to make sure not GUEST
cat(res2)
#> @article{Muschelli2015Validatedimages,
#> author = {},
#> address = {Johns Hopkins Bloomberg School of Public Health; David Geffen School of Medicine at UCLA; Johns Hopkins Medical Institutions},
#> title = {Validated automatic brain extraction of head CT images},
#> journal = {NeuroImage},
#> year = {2015},
#> volume = {114},
#> number = {},
#> pages = {379-385},
#> doi = {10.1016/j.neuroimage.2015.03.074}
#> abstract = {}}
Created on 2019-12-30 by the reprex package (v0.3.0.9000)
Are you sure you're on the necessary IP?
What is the output of
res = rscopus::elsevier_authenticate() res$auth_type
If this is
"GUEST"
, then thebibtex_core_data
may not work.
No, I didn't :-). Now, everything works well!
Sorry to pester you with a feature request, but it would be fantastic if there could be built-in functionality that makes it easier to generate bibtex files based on the query results. My experience using R is somewhat limited, and I'm having trouble looping through the results and the entries of those results, to generate bibtex files containing records for each entry resulting from a given query. Any help with this would be very appreciated!