dlapply: Distributed version of 'lapply'. Similar to dmapply, but permits only one iterable argument, and output.type is
always 'dlist'.
Description
Distributed version of 'lapply'. Similar to dmapply, but permits only one iterable argument, and output.type is
always 'dlist'.
Usage
dlapply(X, FUN, ..., nparts = NULL)
Arguments
X
vector, matrix, list, data.frame, dlist, darray, or dframe or other iterable object to supply to the function in FUN.
FUN
the function to be applied to each element of 'X'.
...
optional arguments to 'FUN'.
nparts
number of partitions in the output dlist.
Value
a dlist with number of partitions specified in 'nparts'
References
Prasad, S., Fard, A., Gupta, V., Martinez, J., LeFevre, J., Xu, V., Hsu, M., Roy, I.
Large scale predictive analytics in Vertica: Fast data transfer, distributed model creation
and in-database prediction. _Sigmod 2015_, 1657-1668.
Venkataraman, S., Bodzsar, E., Roy, I., AuYoung, A., and
Schreiber, R. (2013) Presto: Distributed Machine Learning and
Graph Processing with Sparse Matrices. _EuroSys 2013_, 197-210.
a <- dlapply(1:5,function(x) x, nparts=3)
# A DList with 3 partitions,# which in the aggregate contains the elements 1 through 5.b <- dlapply(a,function(x) x+3) # AddR 3 to each element of dlist a.