dlapply: Distributed version of 'lapply'. Similar to 'dmapply', but...

Description Usage Arguments Value References Examples

View source: R/ddR.R

Description

Distributed version of 'lapply'. Similar to dmapply, but permits only one iterable argument, and output.type is always 'dlist'.

Usage

1
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.

Homepage: https://github.com/vertica/ddR

Examples

1
2
3
4
5
6
7
## Not run: 
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.

## End(Not run)

ddR documentation built on May 29, 2017, 6:52 p.m.