split: Splits and array along a given axis, either totally or only...

View source: R/split.r

splitR Documentation

Splits and array along a given axis, either totally or only subsets

Description

Splits and array along a given axis, either totally or only subsets

Usage

split(X, along, subsets = c(1:dim(X)[along]), drop = NULL)

Arguments

X

An array that should be split

along

Along which axis to split; use -1 for highest dimension

subsets

Whether to split each element or keep some together

drop

Remove unused dimensions after mapping default: drop if all resulting arrays have same number of dimensions

Value

A list of arrays that combined make up the input array


mschubert/arraytools documentation built on Jan. 12, 2023, 8:21 a.m.