eelbrain.table.melt_ndvar¶
-
eelbrain.table.
melt_ndvar
(ndvar, dim=None, cells=None, ds=None, varname=None)¶ Transform data to long format by converting an NDVar dimension into a variable
Parameters: - ndvar : NDVar | str
The NDVar (or name of the NDVar in
ds
).- dim : str
The name of the dimension that should be unwrapped (optional if
ndvar
has only one non-case dimension).- cells : sequence
The values on
dim
that should be included in the output Dataset (default is to include all values).- ds : Dataset
Dataset with additional variables that should be included in the long table.
- varname : str
Name for the transformed
ndvar
(default isndvar.name
).
Returns: - long_table : Dataset
Dataset in long format.