partition: partition

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Partitions a vector x into n groups of roughly equal size.

Usage

1
partition(x, n)

Arguments

x

Vector to partition.

n

Number of (roughly) equally-sized groups

Value

A list of partitions of the vector x.

Examples

1
2
x <- 1:10
partition( x, 3 )

TSDT documentation built on May 2, 2019, 6:40 a.m.