index_groups: Determine Indices and Sizes of Subsets

View source: R/subsets.R

index_groupsR Documentation

Determine Indices and Sizes of Subsets

Description

Create starting and stopping indices for subsets defined by subset_sizes.

Usage

index_groups(n, k)

Arguments

n

The size of the set.

k

The number of subsets.

Value

A matrix with starting index, size, and stopping index for each subset.

See Also

Other subsetting functions: subset_sizes()

Examples

index_groups(n = 100, k = 6)
index_groups(n = 2, k = 6)

fritools documentation built on Nov. 19, 2023, 1:06 a.m.