Description Usage Arguments Details Value
The 'aaply' function did for some reason not want to cooperate for
one of the cases I needed to investigate, so an ad-hoc solution had
to be created in order to get a work-around. The result of this
function has been sanity-checked with the result from 'aaply' for
one of the cases where 'plyr::aaply' did work. Note that even
though the order of the dimensions are ensured to be the same, the
internal order in some of the dimensions might differ, so use
restrict_array
to permute them into the same order.
1 |
.arg_grid |
A data-frame, typically created by
|
.fun |
The function that we want to use. The first argument of
|
.new_dnn |
The name to be used on the dimension of the result
that originates from |
.new_dn |
A vector to be used upon the result that originates
from |
... |
Arguments to be given to |
Note that the result from functions that returns matrices/arrays probably will look like shit if used in this first coarse approximation. It might be possible to create a more advanced version of this function by using 'abind' instead of 'rbind' in the construction, but as I at the moment don't need such funcitonality, I will simply ignore it for the time being.
It might perhaps be possible to adjust this function in order to do bigger chunks when sending stuff to the available cores, which might reduce the overhead a bit. But this will require another design of the function, which I can't use time on.
For functions that return a vector of values, the returned
object will be similar to the result obtained by
plyr::aaply
, with the difference that the new dimension
will be named "values".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.