njahn82 / semscholar

R interface to Semantic Scholar API
Other
16 stars 4 forks source link

Error in s2_papers #1

Open doritge opened 4 years ago

doritge commented 4 years ago

Hi, a very useful package for me. This call creates an error, while the paper exists: docs <- s2_papers("8ea2d1c9370954797fc888bb6b86df0ba09e2afe") While we are at it, could you also return: fieldsOfStudy, journalName, pdfUrls? Thanks, Dorit

njahn82 commented 3 years ago

Please apologise my super late reply and thank you for the bug report. It should be fixed now. Please re-install the package.

library(semscholar)
s2_papers("8ea2d1c9370954797fc888bb6b86df0ba09e2afe")
#> # A tibble: 1 x 14
#>   abstract   arxiv_id authors  citation_veloci… citations doi   influential_cit…
#>   <chr>      <chr>    <list>              <int> <list>    <chr>            <int>
#> 1 This pape… <NA>     <tibble…                0 <tibble … 10.1…                0
#> # … with 7 more variables: paper_id <chr>, references <list>, title <chr>,
#> #   topics <list>, url <chr>, venue <chr>, year <int>

Created on 2021-06-22 by the reprex package (v2.0.0)

I'll take a look into the other metadata fields. At least, pdfUrls seems not to be exported by the Semantic Scholar API.