cut_into_n: Cut a vector into n equal parts

View source: R/cut_functions.R

cut_into_nR Documentation

Cut a vector into n equal parts

Description

Cut a vector into n equal parts

Usage

cut_into_n(x, n, labels = paste0(1:n, "of", n), ...)

Arguments

x

A numeric vector.

n

The number of equal sized parts.

labels

Labels for the factor passed to cut. Default value is "1ofn", "2ofn", ..."nofn"

...

other arguments passed to cut

Value

An ordered factor, dividing x in to n-ths, with default values "1ofn" < "2ofn", < ... < "nofn"

See Also

cut_at

Examples

cut_into_n(100:1, 3)

bbcuffer/rcutils documentation built on Nov. 10, 2023, 12:08 p.m.