eelbrain.Dataset.from_caselist
- classmethod Dataset.from_caselist(names, cases, name=None, caption=None, info=None, random=None, check_dims=True, dim_intersection=False, to_list=False)
Create a Dataset from a list of cases
- Parameters
names (Sequence[str]) – Names for the variables.
cases (Sequence[Sequence[str, Number, NDVar]]) – A sequence of cases, whereby each case is itself represented as a sequence of values (str or scalar). Variable type (Factor or Var) is inferred from whether values are str or not.
name (str) – Name for the Dataset.
caption (str) – Caption for the table.
info (dict) – Info dictionary, can contain arbitrary entries and can be accessed as
.info
attribute after initialization. The Dataset makes a shallow copy.random (Union[str, Collection[str]]) – Names of the columns that should be assigned as random factor.
check_dims (bool) – For
NDVar
columns, check dimensions for consistency between cases (e.g., channel locations in aSensor
). Default isTrue
. Set toFalse
to ignore mismatches.dim_intersection (bool) – Only applies to combining
NDVar
: normally, whenNDVar
have mismatching dimensions, aDimensionMismatchError
is raised. Withdim_intersection=True
, the intersection is used instead.to_list (bool) – Only applies to combining
NDVar
: normally, whenNDVar
have mismatching dimensions, aDimensionMismatchError
is raised. Withto_list=True
, theNDVar
are added aslist
ofNDVar
instead.
Examples
See Dataset basics