eelbrain.table.cast_to_ndvar

eelbrain.table.cast_to_ndvar(data, dim_values, match, sub=None, ds=None, dim=None, unit='s', name=None)

Create an NDVar by converting a data column to a dimension

Parameters
Returns

Copy of ds, aggregated over dim_values, and with an NDVar containing the values form data and a new dimension reflecting dim_values. If dim_values is a Factor, the new dimension is Categorial; if dim_values is a Var, it is Scalar. The new dimension’s name is dim. The only exception to this is that when dim='uts', the new dimension is UTS named 'time'.

Return type

short_ds

See also

melt_ndvar