shards_list: Create Shards from an Explicit Index List

View source: R/shards.R

shards_listR Documentation

Create Shards from an Explicit Index List

Description

Constructs a shard_descriptor from a user-supplied list of index vectors. This is useful for non-contiguous workloads like searchlights/feature sets where each shard operates on an arbitrary subset.

Usage

shards_list(idxs)

Arguments

idxs

List of integer vectors (1-based indices). Each element becomes one shard with fields id, idx, and len.

Value

A shard_descriptor list describing the chunk layout.

Examples

sh <- shards_list(list(1:10, 11:20, 21:30))
length(sh)

shard documentation built on April 3, 2026, 9:08 a.m.