Skip to content

Function: splitFill() ​

ts
function splitFill(x, fac): Map<number, 
  | NeuroVec<TypedArray>
  | SparseNeuroVec>;

Defined in: src/stats/stats.ts:325

Split a NeuroVec by factor levels and fill a new NeuroVec.

Splits the input NeuroVec according to levels of a factor, creating a new NeuroVec for each level containing only the volumes from that level.

Parameters ​

x ​

| NeuroVec<TypedArray> | SparseNeuroVec

The 4D data to split

fac ​

| Float32Array<ArrayBufferLike> | Int32Array<ArrayBufferLike>

Factor array with length equal to number of volumes

Returns ​

Map<number, | NeuroVec<TypedArray> | SparseNeuroVec>

Dictionary mapping factor levels to NeuroVec objects

Released under the MIT License.