使用 R 导出期刊文章的引文

Exporting citation of a journal article using R

我希望 R 能够:

  1. 转到 THIS 页。
  2. Select "Bibtex" 为格式,"Citation and Abstract" 为 "Export type"。
  3. 按"Submit"将引文文件下载到指定文件夹。

可能吗?我怎样才能用 R 做到这一点? (我不知道 JavaScript 并且我无法理解与此问题相关的早期主题。1, 2, 3

最后,我想下载一份期刊(例如 THIS 期刊)的所有 bibtex(可能还有 Endnote)引文。

您可以使用 httr 包伪造表单提交。对于这个请求你可以做

values <- list(
    doi = "10.1002%2Fasi.21577",
    fileFormat = "BIBTEX",
    hasAbstract = "CITATION_AND_ABSTRACT"
)

library(httr)
url <- "http://onlinelibrary.wiley.com/documentcitationdownloadformsubmit"
rr <- POST(url=url, body=values, encode="form")
content(rr, "text")
# [1] "@article {ASI:ASI21577,\nauthor = {Callahan, Ewa S. ...

我认为 rcrossref https://github.com/ropensci/rcrossref#citation-search 可以帮到你,例如

install.packages("rcrossref")
library("rcrossref")    

cat(cr_cn(dois = "10.1126/science.169.3946.635", format = "bibtex"))
#> @article{Frank_1970,
#>  doi = {10.1126/science.169.3946.635},
#>  url = {http://dx.doi.org/10.1126/science.169.3946.635},
#>  year = 1970,
#>  month = {aug},
#>  publisher = {American Association for the Advancement of Science ({AAAS})},
#>  volume = {169},
#>  number = {3946},
#>  pages = {635--641},
#>  author = {H. S. Frank},
#>  title = {The Structure of Ordinary Water: New data and interpretations are yielding new insights     into this fascinating substance},
#>  journal = {Science}
#> }

有了这个,您只需要 DOI。包内还有搜索文章、获取出版商DOI等功能

希望对您有所帮助