tidy: Tidy results from grid_apply or dgraph

Description Usage Arguments Details Value Methods (by class) See Also

Description

Merges the results of grid_apply with the argument grid, with multiple return values as separate columns.

Usage

1
2
3
4
5
tidy(x, ...)

## S3 method for class 'gapply'
tidy(x, arg_grid = NULL, stack = FALSE, .reps = NULL,
  ...)

Arguments

x

results from grid_apply or collect

...

additional arguments passed to either tidy.gresults or tidy.dgraph

arg_grid

argument grid; if NULL (default) looks for arg_grid as an attribute to x

stack

if TRUE (default) stack results into key, value pairs. Otherwise, bind_rows is used. (requires dplyr)

.reps

scalar or vector of completed replications for each job (usually given via collect)

Details

If results are of varying length, it can be useful to 'stack' them into key, value pairs by setting stack=TRUE. When stacking, vectors ar mapped to a single key and data frames are mapped to two keys (rownames and column names). If the results are unnamed, names are assigned as in as.data.frame. See stack_list for further details.

Value

Returns results as a data.frame in long form with the following columns:

...

Columns corresponding to grid of parameters given in expand.grid(...)

rep

the replication number

value

the value of f at a set of parameters

Methods (by class)

See Also

stack_list


patr1ckm/distributr documentation built on May 24, 2019, 8:21 p.m.