Skip to content

Commit

Permalink
update vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jan 14, 2019
1 parent 28ea170 commit 968ac45
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 96 deletions.
72 changes: 24 additions & 48 deletions inst/vign/crossref_vignette.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ get_styles()[1:5]
```

```
#> Error: $ operator is invalid for atomic vectors
#> [1] "academy-of-management-review"
#> [2] "accident-analysis-and-prevention"
#> [3] "aci-materials-journal"
#> [4] "acm-sig-proceedings-long-author-list"
#> [5] "acm-sig-proceedings"
```

`bibtex`
Expand Down Expand Up @@ -81,35 +85,6 @@ cat(cr_cn(dois = "10.1126/science.169.3946.635", format = "bibtex"))
cr_cn(dois = "10.6084/m9.figshare.97218", format = "bibentry")
```

```
#> $doi
#> [1] "10.6084/m9.figshare.97218"
#>
#> $url
#> [1] "https://figshare.com/articles/Regime_shifts_in_ecology_and_evolution_(PhD_Dissertation)/97218"
#>
#> $author
#> [1] "Boettiger, Carl"
#>
#> $keywords
#> [1] "Evolutionary Biology, Ecology"
#>
#> $title
#> [1] "Regime shifts in ecology and evolution (PhD Dissertation)"
#>
#> $publisher
#> [1] "Figshare"
#>
#> $year
#> [1] "2012"
#>
#> $key
#> [1] "https://doi.org/10.6084/m9.figshare.97218"
#>
#> $entry
#> [1] "article"
```

## Citation count

Citation count, using OpenURL
Expand All @@ -120,7 +95,8 @@ cr_citation_count(doi="10.1371/journal.pone.0042793")
```

```
#> [1] 25
#> doi count
#> 1 10.1371/journal.pone.0042793 25
```

## Search Crossref metadata API
Expand Down Expand Up @@ -187,7 +163,7 @@ cr_works(filter=c(has_orcid=TRUE, from_pub_date='2004-04-04'), limit=1)
```
#> $meta
#> total_results search_terms start_index items_per_page
#> 1 2071032 NA 0 1
#> 1 2085016 NA 0 1
#>
#> $data
#> # A tibble: 1 x 27
Expand Down Expand Up @@ -217,8 +193,8 @@ cr_journals(issn=c('1803-2427','2326-4225'))
#> # A tibble: 2 x 53
#> title publisher issn last_status_che… deposits_abstra… deposits_orcids…
#> <chr> <chr> <chr> <date> <lgl> <lgl>
#> 1 Jour… "De Gruy… 1805… 2019-01-08 TRUE FALSE
#> 2 Jour… American… 2326… 2019-01-08 FALSE FALSE
#> 1 Jour… "De Gruy… 1805… 2019-01-14 TRUE FALSE
#> 2 Jour… American… 2326… 2019-01-14 FALSE FALSE
#> # … with 47 more variables: deposits <lgl>,
#> # deposits_affiliations_backfile <lgl>,
#> # deposits_update_policies_backfile <lgl>,
Expand Down Expand Up @@ -264,10 +240,10 @@ cr_licenses(query = 'elsevier')
```
#> $meta
#> total_results search_terms start_index items_per_page
#> 1 30 elsevier 0 20
#> 1 31 elsevier 0 20
#>
#> $data
#> # A tibble: 30 x 2
#> # A tibble: 31 x 2
#> URL work.count
#> <chr> <int>
#> 1 http://aspb.org/publications/aspb-journals/open-articles 1
Expand All @@ -280,7 +256,7 @@ cr_licenses(query = 'elsevier')
#> 8 http://creativecommons.org/licenses/by/4.0/ 4
#> 9 http://doi.wiley.com/10.1002/tdm_license_1 155
#> 10 http://doi.wiley.com/10.1002/tdm_license_1.1 2207
#> # … with 20 more rows
#> # … with 21 more rows
```

### Search based on DOI prefixes
Expand Down Expand Up @@ -328,11 +304,11 @@ cr_members(query='ecology', limit = 5)
#> # A tibble: 5 x 56
#> id primary_name location last_status_che… total.dois current.dois
#> <int> <chr> <chr> <date> <chr> <chr>
#> 1 336 Japanese So… 5-3 Yon… 2019-01-09 1202 127
#> 2 1950 Journal of … Suite 8… 2019-01-09 27 0
#> 3 2080 The Japan S… 5-3 Yon… 2019-01-09 688 18
#> 4 2151 Ecology and… 5-3 Yon… 2019-01-09 394 50
#> 5 2169 Italian Soc… Diparti… 2019-01-09 1256 272
#> 1 336 Japanese So… 5-3 Yon… 2019-01-14 1202 127
#> 2 1950 Journal of … Suite 8… 2019-01-14 27 0
#> 3 2080 The Japan S… 5-3 Yon… 2019-01-14 688 18
#> 4 2151 Ecology and… 5-3 Yon… 2019-01-14 394 50
#> 5 2169 Italian Soc… Diparti… 2019-01-14 1261 277
#> # … with 50 more variables: backfile.dois <chr>, prefixes <chr>,
#> # coverge.affiliations.current <chr>,
#> # coverge.similarity.checking.current <chr>,
Expand Down Expand Up @@ -388,11 +364,11 @@ cr_r()
```

```
#> [1] "10.1007/978-3-662-26397-6_11" "10.1080/00913367.1986.10673037"
#> [3] "10.1163/1574-9347_dnp_e312600" "10.4095/108066"
#> [5] "10.1111/ana.1953.8.issue-1" "10.1109/icbake.2009.36"
#> [7] "10.1016/0009-2614(86)80158-0" "10.1057/9780230226203.0180"
#> [9] "10.2165/00128415-201214240-00077" "10.1158/1538-7445.am2014-2369"
#> [1] "10.1016/j.ijcard.2010.09.031" "10.1039/ct9099500138"
#> [3] "10.1055/s-2003-43252" "10.1016/j.yexmp.2003.11.004"
#> [5] "10.1016/s0734-3299(10)79442-9" "10.1590/s0102-311x2004000800019"
#> [7] "10.1016/0009-2614(82)83542-2" "10.1016/0022-3697(61)90122-6"
#> [9] "10.1016/j.na.2009.06.013" "10.1145/800231.807011"
```

You can pass in the number of DOIs you want back (default is 10)
Expand All @@ -403,6 +379,6 @@ cr_r(2)
```

```
#> [1] "10.1179/026708394790163500" "10.1016/s0140-6736(01)35887-7"
#> [1] "10.1088/0957-0233/3/7/008" "10.1109/iconip.2002.1198212"
```

72 changes: 24 additions & 48 deletions vignettes/crossref_vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ get_styles()[1:5]
```

```
#> Error: $ operator is invalid for atomic vectors
#> [1] "academy-of-management-review"
#> [2] "accident-analysis-and-prevention"
#> [3] "aci-materials-journal"
#> [4] "acm-sig-proceedings-long-author-list"
#> [5] "acm-sig-proceedings"
```

`bibtex`
Expand Down Expand Up @@ -81,35 +85,6 @@ cat(cr_cn(dois = "10.1126/science.169.3946.635", format = "bibtex"))
cr_cn(dois = "10.6084/m9.figshare.97218", format = "bibentry")
```

```
#> $doi
#> [1] "10.6084/m9.figshare.97218"
#>
#> $url
#> [1] "https://figshare.com/articles/Regime_shifts_in_ecology_and_evolution_(PhD_Dissertation)/97218"
#>
#> $author
#> [1] "Boettiger, Carl"
#>
#> $keywords
#> [1] "Evolutionary Biology, Ecology"
#>
#> $title
#> [1] "Regime shifts in ecology and evolution (PhD Dissertation)"
#>
#> $publisher
#> [1] "Figshare"
#>
#> $year
#> [1] "2012"
#>
#> $key
#> [1] "https://doi.org/10.6084/m9.figshare.97218"
#>
#> $entry
#> [1] "article"
```

## Citation count

Citation count, using OpenURL
Expand All @@ -120,7 +95,8 @@ cr_citation_count(doi="10.1371/journal.pone.0042793")
```

```
#> [1] 25
#> doi count
#> 1 10.1371/journal.pone.0042793 25
```

## Search Crossref metadata API
Expand Down Expand Up @@ -187,7 +163,7 @@ cr_works(filter=c(has_orcid=TRUE, from_pub_date='2004-04-04'), limit=1)
```
#> $meta
#> total_results search_terms start_index items_per_page
#> 1 2071032 NA 0 1
#> 1 2085016 NA 0 1
#>
#> $data
#> # A tibble: 1 x 27
Expand Down Expand Up @@ -217,8 +193,8 @@ cr_journals(issn=c('1803-2427','2326-4225'))
#> # A tibble: 2 x 53
#> title publisher issn last_status_che… deposits_abstra… deposits_orcids…
#> <chr> <chr> <chr> <date> <lgl> <lgl>
#> 1 Jour… "De Gruy… 1805… 2019-01-08 TRUE FALSE
#> 2 Jour… American… 2326… 2019-01-08 FALSE FALSE
#> 1 Jour… "De Gruy… 1805… 2019-01-14 TRUE FALSE
#> 2 Jour… American… 2326… 2019-01-14 FALSE FALSE
#> # … with 47 more variables: deposits <lgl>,
#> # deposits_affiliations_backfile <lgl>,
#> # deposits_update_policies_backfile <lgl>,
Expand Down Expand Up @@ -264,10 +240,10 @@ cr_licenses(query = 'elsevier')
```
#> $meta
#> total_results search_terms start_index items_per_page
#> 1 30 elsevier 0 20
#> 1 31 elsevier 0 20
#>
#> $data
#> # A tibble: 30 x 2
#> # A tibble: 31 x 2
#> URL work.count
#> <chr> <int>
#> 1 http://aspb.org/publications/aspb-journals/open-articles 1
Expand All @@ -280,7 +256,7 @@ cr_licenses(query = 'elsevier')
#> 8 http://creativecommons.org/licenses/by/4.0/ 4
#> 9 http://doi.wiley.com/10.1002/tdm_license_1 155
#> 10 http://doi.wiley.com/10.1002/tdm_license_1.1 2207
#> # … with 20 more rows
#> # … with 21 more rows
```

### Search based on DOI prefixes
Expand Down Expand Up @@ -328,11 +304,11 @@ cr_members(query='ecology', limit = 5)
#> # A tibble: 5 x 56
#> id primary_name location last_status_che… total.dois current.dois
#> <int> <chr> <chr> <date> <chr> <chr>
#> 1 336 Japanese So… 5-3 Yon… 2019-01-09 1202 127
#> 2 1950 Journal of … Suite 8… 2019-01-09 27 0
#> 3 2080 The Japan S… 5-3 Yon… 2019-01-09 688 18
#> 4 2151 Ecology and… 5-3 Yon… 2019-01-09 394 50
#> 5 2169 Italian Soc… Diparti… 2019-01-09 1256 272
#> 1 336 Japanese So… 5-3 Yon… 2019-01-14 1202 127
#> 2 1950 Journal of … Suite 8… 2019-01-14 27 0
#> 3 2080 The Japan S… 5-3 Yon… 2019-01-14 688 18
#> 4 2151 Ecology and… 5-3 Yon… 2019-01-14 394 50
#> 5 2169 Italian Soc… Diparti… 2019-01-14 1261 277
#> # … with 50 more variables: backfile.dois <chr>, prefixes <chr>,
#> # coverge.affiliations.current <chr>,
#> # coverge.similarity.checking.current <chr>,
Expand Down Expand Up @@ -388,11 +364,11 @@ cr_r()
```

```
#> [1] "10.1007/978-3-662-26397-6_11" "10.1080/00913367.1986.10673037"
#> [3] "10.1163/1574-9347_dnp_e312600" "10.4095/108066"
#> [5] "10.1111/ana.1953.8.issue-1" "10.1109/icbake.2009.36"
#> [7] "10.1016/0009-2614(86)80158-0" "10.1057/9780230226203.0180"
#> [9] "10.2165/00128415-201214240-00077" "10.1158/1538-7445.am2014-2369"
#> [1] "10.1016/j.ijcard.2010.09.031" "10.1039/ct9099500138"
#> [3] "10.1055/s-2003-43252" "10.1016/j.yexmp.2003.11.004"
#> [5] "10.1016/s0734-3299(10)79442-9" "10.1590/s0102-311x2004000800019"
#> [7] "10.1016/0009-2614(82)83542-2" "10.1016/0022-3697(61)90122-6"
#> [9] "10.1016/j.na.2009.06.013" "10.1145/800231.807011"
```

You can pass in the number of DOIs you want back (default is 10)
Expand All @@ -403,6 +379,6 @@ cr_r(2)
```

```
#> [1] "10.1179/026708394790163500" "10.1016/s0140-6736(01)35887-7"
#> [1] "10.1088/0957-0233/3/7/008" "10.1109/iconip.2002.1198212"
```

0 comments on commit 968ac45

Please sign in to comment.