distribute: Calculations for how to distribute x items over N nodes

Description Usage Arguments Value See Also Examples

Description

This function is used to determine how to distribute the contents of a data frame across the cluster. It may either be called with a single number representing the total number of rows, or it may be called with a vector of numbers representing the size of groups.

Usage

1
distribute(x, N)

Arguments

x

Number of items or a vector of group sizes

N

Number of nodes

Value

A vector containing number of rows or a list containing the indices of groups

See Also

Other utility functions: between, cumall, cumany, cummean, first, lag, last, lead, n_distinct, n_groups, nth, n

Examples

1
2
distribute (100, 4)
distribute (c(25, 25, 50), 2)

jeblundell/multiplyr documentation built on May 19, 2019, 12:39 a.m.