eelbrain.align1

eelbrain.align1(d, to, by='index', out='data')

Align a data object to an index variable

Parameters:
d : data-object

Data object with cases that should be aligned to idx.

to : data-object

Index array to which d should be aligned. If to is a Dataset, use to[by].

by : str | data-object

Variable labeling cases in d for aligning them to to. If d is a Dataset, by can be the name of a variable in d.

out : ‘data’ | ‘index’

Return a restructured copy of d (default) or an index array into d.

Returns:
d_aligned : data-object | array

Aligned copy of d (or index to align d to idx if out='index').

See also

align
Align two data-objects