core_compare_functions: core_compare_functions

Description Usage Arguments Details Value Author(s) Examples

Description

Compare Two or more functions on execution times using a given sample size of the given parameter

Usage

1
core_compare_functions(functions, param, size)

Arguments

functions

A vector of single parameter functions. Do not include parameters. Only the function names.

param

A single vector, list or data.table parameter for the functions.

size

An integer value. This is the sample size of param to run the functions

Details

Runs the functions using random sampling of provided parameter for given sample size, and returns a data table with executions times and execution rates for the different functions

Value

A data.table showing execution times and execution rates for the functions when run with sample of param for sample size size

Author(s)

Sujeet G Pillai

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
sample_function_1 <- function(arg){#Logic}
sample_function_2 <- function(arg){#Logic}
param # <A vector/list/data.table object to be passed as arg to the sample_functions>
size # Size of Sample
compare_functions(functions = c(sample_function_1, sample_function_2), param = param, 
size = size)

## End(Not run)

sujeetp97/compare-functions documentation built on May 15, 2019, 1:39 p.m.