Skip to content

Instantly share code, notes, and snippets.

@rfhb
rfhb / ctrdata_ctrLoadQueryIntoDb_batch.R
Last active March 6, 2020 15:36
ctrdata: iterating over batches of clinical trial records to be retrieved
db <- nodbi::src_mongo("test")
trials.df <- data.frame(number = integer(),
imported = numeric(),
query = character(),
stringsAsFactors = FALSE)
for (year.end in 2005:2020) {
for (month in 1:12) {