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

Align a data object to an index variable

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.

d_aligned : data-object | array

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

See also

Align two data-objects