Skip to content

Commit

Permalink
flatten chunks of fetched df before rbind-ing
Browse files Browse the repository at this point in the history
  • Loading branch information
yjunechoe committed Jan 29, 2024
1 parent ccb6c29 commit eedbd7e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/oa_fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ oa_fetch <- function(entity = if (is.null(identifier)) NULL else id_type(shorten
if (output == "list") {
unlist(final_res, recursive = FALSE)
} else {
# Flatten out the initial chunking of 50 at a time
final_res <- list(unlist(final_res, recursive = FALSE))
do.call(rbind, lapply(
final_res, oa2df,
entity = entity, options = options, abstract = abstract,
Expand Down

0 comments on commit eedbd7e

Please sign in to comment.