callWithData | R Documentation |
Call a Function with Argument Combinations from a Data Frame
callWithData(
FUN,
data,
...,
threshold = 0.5,
SIMPLIFY = TRUE,
USE.NAMES = TRUE
)
FUN |
function to be called |
data |
data frame with one column per argument of |
... |
further (constant) arguments to |
threshold |
if the ratio of unique value combinations in the relevant columns in data to all value combinations in these columns is below this threshold value then FUN will be called only with the unique value combinations. This should increase performance. |
SIMPLIFY |
passed to |
USE.NAMES |
passed to |
vector of length nrow(data)
with the result values returned by
FUN
combis <- expand.grid(x = 1:2, y = c(10, 20, 30))
combis
callWithData(`+`, combis)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.