slice_first_dim: Slice an Array or Matrix Along Its First Dimension

View source: R/helpers.R

slice_first_dimR Documentation

Slice an Array or Matrix Along Its First Dimension

Description

Selects rows idx along the first (sample) axis, keeping all other dimensions intact, regardless of how many dimensions the array has.

Usage

slice_first_dim(x, idx)

Arguments

x

A matrix or array.

idx

Integer indices into the first dimension.

Value

x restricted to idx along dim 1 (drop = FALSE).


ggmlR documentation built on July 14, 2026, 1:08 a.m.