Skip to content

Commit 485f4c3

Browse files
committed
sometimes, vignette build fails
1 parent e2f84b3 commit 485f4c3

2 files changed

Lines changed: 34 additions & 29 deletions

File tree

README.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,16 @@ An increasing number of universities, research organisations and funders have la
231231

232232
#### Gathering DOIs representing scholarly publications
233233

234-
DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 50 DOIs registered with Crossref by using the [rcrossref package](https://github.com/ropensci/rcrossref).
234+
DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 50 articles published in the Journal of the Association for Information Science and Technology from Crossref with the [rcrossref package](https://github.com/ropensci/rcrossref).
235235

236236

237237
```r
238238
library(dplyr)
239239
library(rcrossref)
240240
# get a random sample of DOIs and metadata describing these works
241-
random_dois <- rcrossref::cr_r(sample = 50)
241+
random_dois <- rcrossref::cr_r(filter = list(
242+
issn = "2330-1643", type = "journal-article"
243+
), sample = 50)
242244
```
243245

244246
#### Calling Unpaywall
@@ -262,15 +264,15 @@ oa_df
262264
#> doi best_oa_location oa_locations oa_locations_em… data_standard is_oa
263265
#> <chr> <list> <list> <list> <int> <lgl>
264266
#> 1 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
265-
#> 2 10.1… <tibble [1 × 8]> <tibble [1 … <tibble [0 × 0]> 2 TRUE
267+
#> 2 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
266268
#> 3 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
267269
#> 4 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
268-
#> 5 10.7… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
270+
#> 5 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
269271
#> 6 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
270272
#> 7 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
271-
#> 8 10.1… <tibble [1 × 8]> <tibble [1 … <tibble [0 × 0]> 2 TRUE
272-
#> 9 10.1… <tibble [1 × 9]> <tibble [1 … <tibble [0 × 0]> 2 TRUE
273-
#> 10 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
273+
#> 8 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
274+
#> 9 10.1… <tibble [0 × 0]> <tibble [0 … <tibble [0 × 0]> 2 FALSE
275+
#> 10 10.1… <tibble [1 × 8]> <tibble [1 … <tibble [0 × 0]> 2 TRUE
274276
#> # … with 40 more rows, and 15 more variables: is_paratext <lgl>, genre <chr>,
275277
#> # oa_status <chr>, has_repository_copy <lgl>, journal_is_oa <lgl>,
276278
#> # journal_is_in_doaj <lgl>, journal_issns <chr>, journal_issn_l <chr>,
@@ -290,31 +292,33 @@ oa_df %>%
290292
#> # A tibble: 2 x 3
291293
#> is_oa Articles Proportion
292294
#> <lgl> <int> <dbl>
293-
#> 1 FALSE 38 0.76
294-
#> 2 TRUE 12 0.24
295+
#> 1 FALSE 30 0.6
296+
#> 2 TRUE 20 0.4
295297
```
296298

297-
How did Unpaywall find those Open Access full-texts, which were characterized as best matches, and how are these OA types distributed over publication types?
299+
How did Unpaywall find those Open Access full-texts, and which were characterized as best matches?
298300

299301

300302
```r
301303
oa_df %>%
302304
filter(is_oa == TRUE) %>%
303-
select(best_oa_location, oa_status, genre) %>%
304-
tidyr::unnest(best_oa_location) %>%
305-
group_by(oa_status, evidence, genre) %>%
305+
tidyr::unnest(oa_locations) %>%
306+
group_by(oa_status, evidence, is_best) %>%
306307
summarise(Articles = n()) %>%
307308
arrange(desc(Articles))
308-
#> # A tibble: 6 x 4
309-
#> # Groups: oa_status, evidence [5]
310-
#> oa_status evidence genre Articles
311-
#> <chr> <chr> <chr> <int>
312-
#> 1 bronze open (via free pdf) journal-article 6
313-
#> 2 gold open (via page says license) journal-article 2
314-
#> 3 gold oa journal (via publisher name) component 1
315-
#> 4 green oa repository (semantic scholar lookup) journal-article 1
316-
#> 5 green oa repository (semantic scholar lookup) monograph 1
317-
#> 6 hybrid open (via page says license) journal-article 1
309+
#> # A tibble: 9 x 4
310+
#> # Groups: oa_status, evidence [8]
311+
#> oa_status evidence is_best Articles
312+
#> <chr> <chr> <lgl> <int>
313+
#> 1 bronze open (via free article) TRUE 11
314+
#> 2 green oa repository (via OAI-PMH title and first author … TRUE 4
315+
#> 3 green oa repository (via OAI-PMH doi match) TRUE 2
316+
#> 4 hybrid open (via crossref license) FALSE 2
317+
#> 5 hybrid open (via page says license) TRUE 2
318+
#> 6 green oa repository (via OAI-PMH doi match) FALSE 1
319+
#> 7 hybrid oa repository (via OAI-PMH doi match) FALSE 1
320+
#> 8 hybrid oa repository (via OAI-PMH title and first author … FALSE 1
321+
#> 9 hybrid open (via crossref license, author manuscript) TRUE 1
318322
```
319323

320324
#### More examples

vignettes/intro.Rmd

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,15 @@ An increasing number of universities, research organisations and funders have la
132132

133133
#### Gathering DOIs representing scholarly publications
134134

135-
DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 50 DOIs registered with Crossref by using the [rcrossref package](https://github.com/ropensci/rcrossref).
135+
DOIs have become essential for referencing scholarly publications, and thus many digital libraries and institutional databases keep track of these persistent identifiers. For the sake of this vignette, instead of starting with a pre-defined set of publications originating from these sources, we simply generate a random sample of 50 articles published in the Journal of the Association for Information Science and Technology from Crossref with the [rcrossref package](https://github.com/ropensci/rcrossref).
136136

137137
```{r, message=FALSE}
138138
library(dplyr)
139139
library(rcrossref)
140140
# get a random sample of DOIs and metadata describing these works
141-
random_dois <- rcrossref::cr_r(sample = 50)
141+
random_dois <- rcrossref::cr_r(filter = list(
142+
issn = "2330-1643", type = "journal-article"
143+
), sample = 50)
142144
```
143145

144146
#### Calling Unpaywall
@@ -168,14 +170,13 @@ oa_df %>%
168170
arrange(desc(Articles))
169171
```
170172

171-
How did Unpaywall find those Open Access full-texts, which were characterized as best matches, and how are these OA types distributed over publication types?
173+
How did Unpaywall find those Open Access full-texts, and which were characterized as best matches?
172174

173175
```{r}
174176
oa_df %>%
175177
filter(is_oa == TRUE) %>%
176-
select(best_oa_location, oa_status, genre) %>%
177-
tidyr::unnest(best_oa_location) %>%
178-
group_by(oa_status, evidence, genre) %>%
178+
tidyr::unnest(oa_locations) %>%
179+
group_by(oa_status, evidence, is_best) %>%
179180
summarise(Articles = n()) %>%
180181
arrange(desc(Articles))
181182
```

0 commit comments

Comments
 (0)