parts: Retrieves, as a list of independent objects, pointers to each...

Description Usage Arguments Details Value References Examples

View source: R/dobject.R

Description

Retrieves, as a list of independent objects, pointers to each individual partition of the input.

Usage

1
parts(dobj, index = NULL)

Arguments

dobj

input object.

index

numeric vector or list of indices referencing the partitions of the distributed object. If NULL, the returned list contains pointers to all partitions.

Details

parts() is primarily used in conjunction with dmapply when functions are written to be applied over partitions of distributed objects.

Value

a list of distributed objects, each referring to one partition of the input.

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
## Not run: 
a <- darray(psize=c(3,3),dim=c(9,9),data=3) # A darray of 9 partitions, each 3x3
b <- dmapply(function(x) sum(x), parts(a)) # dmapply to each 3x3 partition of 'a'
c <- parts(a,3) # A list containing one DObject, which is the 3rd partition of 'a'

## End(Not run)

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