mapply
, this function applies a given function to each data
component in
the input multiData arguments, and optionally simplify the result to an array if possible.mtd.mapply( # What to do
FUN, ..., MoreArgs = NULL,
# How to interpret the input
mdma.argIsMultiData = NULL,
# Copy previously known results?
mdmaExistingResults = NULL, mdmaUpdateIndex = NULL,
# How to format output
mdmaSimplify = FALSE,
returnList = FALSE,
# Options controlling internal behaviour
mdma.doCollectGarbage = FALSE,
mdmaVerbose = 0, mdmaIndent = 0)
FUN
....
. If not given, multiData status will be determined using
isMult
multiData
have changed and recalculating the unchanged ones is computationally
expensive. If not given, all calculations will be performed. IfmultiData
the calculation should
actually be carried out. This argument has an effect only if mdmaExistingResults
is non-NULL. If the
length of mdmaExistingResults
(call the lFALSE
if that happens.mdaSimplify
is TRUE
, this argument is
ignored.FUN
?data
components) the results of FUN
. If
simplification is successful, an array instead.data
component. In a "strict" multiData structure, the
data
components are required to each be a matrix or a data frame and have the same number of
columns. In a "loose" multiData structure, the data
components can be anything (but for most
purposes should be of comparable type and content).This function applies the function FUN
to each data
component of those arguments in
...
that are multiData structures in the "loose" sense,
and to each component of those arguments in ...
that are
not multiData structures.
multiData
to create a multiData structure;multiData.apply
for application of a function to a single multiData structure.