gar_batch_walk: Walk data through batches

Description Usage Arguments Details Value See Also

View source: R/googleAuthR_batch.R

Description

Convienience function for walking through data in batches

Usage

1
2
3
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, ...)

Arguments

f

a function from gar_api_generator

walk_vector

a vector of the parameter or path to change

gar_pars

a list of parameter arguments for f

gar_paths

a list of path arguments for f

the_body

a list of body arguments for f

pars_walk

a character vector of the parameter(s) to modify for each walk of f

path_walk

a character vector of the path(s) to modify for each walk of f

body_walk

a character vector of the body(s) to modify for each walk of f

batch_size

size of each request to Google /batch API

batch_function

a function that will act on the result list of each batch API call

data_frame_output

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

Details

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.

Value

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

See Also

Other batch functions: applyDataParseFunction, doBatchRequest, gar_batch, makeBatchRequest, parseBatchResponse


yinscapital/googleAuthR-reference documentation built on May 3, 2019, 4:31 p.m.