citations client
R
Latest commit e0564f8 Feb 12, 2017 @sckott sckott update pkg level man file
Permalink
Failed to load latest commit information.
R
man
tests
.Rbuildignore
.gitignore
.travis.yml
CONDUCT.md
DESCRIPTION
LICENSE
NAMESPACE
README.Rmd
README.md
scitations.Rproj

README.md

scitations

Build Status codecov

scitations - citations for R

Installation

install.packages("devtools")
devtools::install_github("ropenscilabs/scitations")
library("scitations")

make a citation

(cit <- scitation(
  "article", 
  'petkun2016', 
  doi = "10.7717/peerj.1126",
  author = "foobar",
  title = "That and this and stuff and things",
  journaltitle = "Stuff And Things",
  year = 2001
))
#> <scitation> 10.7717/peerj.1126 
#>   type:  article

citations via crossref data

library("rcrossref")
res <- cr_works(limit = 3)
as.scitation(res$data) 

coerce to a data.frame

scitation_df(cit, cit, cit)
#> # A tibble: 3 × 7
#>      type        key                doi author
#>     <chr>      <chr>              <chr>  <chr>
#> 1 article petkun2016 10.7717/peerj.1126 foobar
#> 2 article petkun2016 10.7717/peerj.1126 foobar
#> 3 article petkun2016 10.7717/peerj.1126 foobar
#> # ... with 3 more variables: title <chr>, journaltitle <chr>, year <dbl>

or from a list

scitation_df(.list = list(cit, cit, cit))
#> # A tibble: 3 × 7
#>      type        key                doi author
#>     <chr>      <chr>              <chr>  <chr>
#> 1 article petkun2016 10.7717/peerj.1126 foobar
#> 2 article petkun2016 10.7717/peerj.1126 foobar
#> 3 article petkun2016 10.7717/peerj.1126 foobar
#> # ... with 3 more variables: title <chr>, journaltitle <chr>, year <dbl>

Meta