Convenience function for walking through data in batches
gar_batch_walk(f, walk_vector, gar_pars = NULL, gar_paths = NULL,
the_body = NULL, pars_walk = NULL, path_walk = NULL, body_walk = NULL,
batch_size = 10, batch_function = NULL, data_frame_output = TRUE, ...)
a function from gar_api_generator
a vector of the parameter or path to change
a list of parameter arguments for f
a list of path arguments for f
a list of body arguments for f
a character vector of the parameter(s) to modify for each walk of f
a character vector of the path(s) to modify for each walk of f
a character vector of the body(s) to modify for each walk of f
size of each request to Google /batch API
a function that will act on the result list of each batch API call
if the list of lists are dataframes, you can bind them all by setting to TRUE
further arguments passed to the data parse function of f
if data_frame_output is FALSE: A list of lists. Outer list the length of number of batches required, inner lists the results from the calls
if data_frame_output is TRUE: The list of lists will attempt to rbind all the results
You can modify more than one parameter or path arg,
but it must be the same walked vector e.g. start = end = x
Many Google APIs have batch_size
limits greater than 10, 1000 is common.
Other batch functions: applyDataParseFunction
,
doBatchRequest
, gar_batch
,
makeBatchRequest
,
parseBatchResponse