xapply | R Documentation |
"applies" an expression (.) to a list of "arguments".
Analogous to mapply but works with expressions rather than functions.
Examples:
mxapply(a+b, a=1:5, b=2:6)
mxapply(c(a+b, a-b), a=1:5, b=2:6)
mxapply(c(a+b, a-b), a=1:5, b=2:6, FUN=rbind)
mxapply(c(a+b, a-b), a=1:5, b=2:6, FUN=data.frame)
xapply(., ..., SIMPLIFY = TRUE, FUN = cbind)
. |
an expression |
... |
named args (must be named!) |
SIMPLIFY |
to return a simple vector or matrix if possible? |
FUN |
function to be called to simplify the result (e.g rbind, cbind, data.frame) |
a value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.