Learn R Programming

ggmlR (version 0.8.1)

slice_first_dim: 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)

Value

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

Arguments

x

A matrix or array.

idx

Integer indices into the first dimension.