eelbrain.NDVar.aggregate
- NDVar.aggregate(x=None, func=<function mean>, name=None)
Summarize data in each cell of
x
- Parameters
x (Union[Factor, Interaction, NestedEffect, str]) – Categorial whose cells define which cases to aggregate.
func (Callable) – Function that is used to create a summary of the cases falling into each cell of
x
. The function needs to accept the data as first argument andaxis
as keyword-argument. Default isnumpy.mean()
.name (str) – Name of the output
NDVar
(default is the current name).
- Returns
NDVar with data aggregated over cells of
x
.- Return type
aggregated_ndvar