workers: Segment a data set into subsets

Description Usage Arguments Value Examples

View source: R/Workers.R

Description

This algorithm segments a data set into a prespecified number of subsets.

Usage

1
workers(X, n, random = T)

Arguments

X

A matrix to be subsetted.

n

Number of subsets to be created.

random

If true, the rows of X are shuffled prior to the split.

Value

A list containing the n subsets.

Examples

1
2
3
4
5
6
7
#Split a matrix with 100 rows and two columns into 5 subsets

#Simulate data
df<-matrix(data = c(rnorm(100), runif(100)), ncol=2)

#Return list of subsets
workers(df, n=5)

JacobRaymond/ConquerMCMC documentation built on May 12, 2020, 1:03 a.m.