gapply | R Documentation |
Runs all combinations of elements in ...
as parameters of FUN
(grid apply).
I(.)
can be used to avoid that an element is interpreted as a grid value.
If an error occurs then the result of FUN
will not be stored, you may note missing indices
in the returning list.
gapply(FUN, ..., .simplify = TRUE)
FUN |
fucntion or character: string naming the function to be called |
... |
list: arguments to the function call. The names attribute of args gives the argument names |
.simplify |
logical: should the result be simplified to a data frame if possible? (default: |
a list or a data frame with the function results
# 8 function calls: sum(1,3,5), sum(1,3,6), ..., sum(2,4,6)
gapply("sum", 1:2, 3:4, 5:6)
# 4 function calls: sum(1,3,5:6), sum(1,4,5:66), ..., sum(2,4,5:6)
gapply("sum", 1:2, 3:4, I(5:6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.