Description Usage Arguments Details Author(s) See Also
Parallel apply function is used to perform the same operation over all the elements of data objects like matrices, or lists. This function provides a parallel implementation of both the apply() and lapply() functions from the core of the R programming language. The papply() function only accepts matrices or lists of matrices as input data objects.
1 |
data |
input data matrix or list of matrices |
fun |
function to be applied |
margin |
vector indicating which elements of the matrix the function will be applied to. The default value is 1 and indicates the rows, 2 indicates the columns and the parameter is ignored if data is a list. |
out_filename |
string, not used at present. |
The function to be applied can be supplied to papply() either as a function name or as a function definition. When only the function name is provided, the package implementing the function has to be loaded before the SPRINT library is initialised in order to ensure that the name is recognised by all the processes involved in the computation.
Note that papply() does not fully implement lapply functionality. It will only accept lists of matrices, and not lists made up of other data types.
N.B. Please see the SPRINT User Guide for how to run the code in parallel using the mpiexec command.
University of Edinburgh SPRINT Team sprint@ed.ac.uk www.r-sprint.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.