require(tidyverse) require(lubridate) source('globalData.R') source('interfaces.R') # readGlimsArchive() createPatches = function(tPeriods, dataPath, tFiles, tFileOvw) { for (m in 1:nrow(tPeriods)) { patch = readGlimsArchive( ymdStartDate = tPeriods$startDate[m], ymdEndDate = tPeriods$endDate[m], readPreprocessed = F, tFiles = tFiles, tFileOvw = tFileOvw ) filename = paste0(dataPath,'/bk_', tPeriods$startDate[m], '_', tPeriods$endDate[m], '.rds') write_rds(patch, filename, compress = 'gz') } }