Description Usage Arguments Details Value Author(s) Examples
Compare Two or more functions on execution times using a given sample size of the given parameter
1 | core_compare_functions(functions, param, size)
|
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 |
size |
An integer value. This is the sample size of |
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
A data.table showing execution times and execution rates for the functions
when run with sample of param
for sample size size
Sujeet G Pillai
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.