Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
should address searchplos problem #121
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jul 17, 2018
1 parent e7b99d2 commit 5eb0c06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/searchplos.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ searchplos <- function(q = NULL, fl = 'id', fq = NULL, sort = NULL, start = 0,
return(list(meta = meta, data = jsonout))
} else {
byby <- 500
getvecs <- seq(from = 1, to = getnumrecords, by = byby)
getvecs <- seq(from = 0, to = getnumrecords - 1, by = byby)
lastnum <- as.numeric(strextract(getnumrecords, "[0-9]{3}$"))
if (lastnum == 0)
lastnum <- byby
Expand All @@ -154,7 +154,9 @@ searchplos <- function(q = NULL, fl = 'id', fq = NULL, sort = NULL, start = 0,
args$rows <- getrows[i]
if (length(args) == 0) args <- NULL
jsonout <- suppressMessages(conn_plos$search(
params = ploscompact(list(q = args$q, fl = args$fl, fq = args$fq,
params = ploscompact(list(q = args$q, fl = args$fl,
fq = args[names(args) == "fq"],
# fq = args$fq,
sort = args$sort,
rows = args$rows, start = args$start,
wt = "json")), minOptimizedRows = FALSE, callopts = callopts, ...
Expand Down

0 comments on commit 5eb0c06

Please sign in to comment.