ropensci / openalexR

Getting bibliographic records from OpenAlex
https://docs.ropensci.org/openalexR/
Other
97 stars 21 forks source link

Truncation warning #235

Closed trangdata closed 5 months ago

trangdata commented 5 months ago

Closes #234.

library(openalexR)
w1 <- oa_fetch(
  identifier = c("W2789389013", "W2811921651"),
  output = "list"
)
#> Warning in oa_request(oa_query(filter = filter_i, multiple_id = multiple_id, : 
#> The following work(s) have truncated lists of authors: W2789389013, W2811921651.
#> Query each work separately by its identifier to get full list of authors.
#> For example:
#>   lapply(c("W2789389013", "W2811921651"), \(x) oa_fetch(identifier = x))
#> Details at https://docs.openalex.org/api-entities/authors/limitations.
unlist(lapply(w1, function(x) length(x$authorships)))
#> [1] 100 100

w2 <- lapply(
  c("W2789389013", "W2811921651"),
  \(x) oa_fetch(identifier = x, output = "list")
)
unlist(lapply(w2, \(x) length(x$authorships)))
#> [1] 377 149

Created on 2024-04-27 with reprex v2.0.2