partition: partition

View source: R/utility_functions.R

partitionR Documentation

partition

Description

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

Usage

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

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

TSDT documentation built on April 7, 2022, 1:07 a.m.

Related to partition in TSDT...