Client for the Citoid service https://www.mediawiki.org/wiki/Citoid

docs: https://en.wikipedia.org/api/rest_v1/#!/Citation/getCitation

There are two functions, both of which do the same things, except:

Even with cit_oid() though, you get a list of lists, and you may want to parse it to a data.frame. See an example below.

Install

Stable version

install.packages("rcitoid")

Development version

devtools::install_github("ropenscilabs/rcitoid")

Load the package

library("rcitoid")

parse to data.frame

because the resulting data is nested and can have missing data slots, it’s probably easier to get raw text and manipulate from there.

library(dplyr)

pmid <- c(30446726, 30722046, 30687373, 30688010)
pmcid <- c("PMC4679344", "PMC6347797", "PMC6347793")
isbn <- 1439895619
dois <- c("10.1109/jsac.2011.110806", "10.1007/s00422-006-0078-4",
  "10.5040/9781474219624-0044", "10.1109/icemi.2009.5274826",
  "10.1109/wispnet.2017.8299996")
res <- cit_oid_(id = c(pmid, pmcid, isbn, dois))
tbl_df(bind_rows(lapply(res, jsonlite::fromJSON)))
#> # A tibble: 13 x 35
#>    key   version itemType tags  title ISSN  journalAbbrevia…
#>    <chr>   <int> <chr>    <lis> <chr> <lis> <chr>           
#>  1 X42G…       0 journal… <lis… Enha… <chr… Mucosal Immunol 
#>  2 LNTZ…       0 journal… <lis… Shar… <chr… Mol. Biol. Evol.
#>  3 ADUB…       0 journal… <dat… Resp… <chr… Front Plant Sci 
#>  4 GDTL…       0 webpage  <lis… A mi… <NUL… <NA>            
#>  5 EBZS…       0 journal… <lis… ESMO… <NUL… <NA>            
#>  6 M4GB…       0 journal… <lis… Effi… <NUL… <NA>            
#>  7 M3LT…       0 journal… <lis… Iden… <chr… J Hematol Oncol 
#>  8 <NA>       NA book     <NUL… Agro… <NUL… <NA>            
#>  9 BS3M…       0 journal… <lis… Anti… <chr… <NA>            
#> 10 PNNM…       0 journal… <lis… The … <chr… <NA>            
#> 11 WKX7…       0 book     <lis… The … <NUL… <NA>            
#> 12 47LX…       0 journal… <lis… Desi… <NUL… <NA>            
#> 13 QU6I…       0 confere… <lis… Traf… <NUL… <NA>            
#> # … with 28 more variables: publicationTitle <chr>, date <chr>,
#> #   abstractNote <chr>, DOI <chr>, extra <chr>, libraryCatalog <chr>,
#> #   url <chr>, accessDate <chr>, author <list>, PMID <chr>, source <list>,
#> #   pages <chr>, volume <chr>, shortTitle <chr>, PMCID <chr>,
#> #   language <chr>, websiteTitle <chr>, issue <chr>, oclc <chr>,
#> #   ISBN <list>, edition <chr>, place <chr>, numPages <chr>,
#> #   contributor <list>, publisher <chr>, editor <list>,
#> #   proceedingsTitle <chr>, conferenceName <chr>

Meta

ropensci_footer