select_results: Select results

Description Usage Arguments Author(s) Examples

Description

This function selects rows from a dataframe of simulation results. For example using the default functional which.max the rows containing the maximum of column what within values of group are selected. The function adds column with name select_what that specifies based on which columns a row was selected.

Usage

1
select_results(sim_results, group, what, functional = which.max)

Arguments

sim_results

Simulation results from a previous simulation run

group

Grouping variables within unique values of which results should be selected

what

Variable based on which the selection is performed

functional

Function that returns a unique vector position

Author(s)

Florian Klinglmueller

Examples

1
2
3
scenarios <- expand.grid(m=c(0,1),s=c(1,2),n=10:20)
results <- simulate_batch(scenarios,10000,simulate_poly)
select_results(results,'n',"result")

floatofmath/casino documentation built on May 16, 2019, 1:21 p.m.