eelbrain.Factor.as_var

Factor.as_var(labels=None, default=None, name=None)

Convert into a Var

Parameters:
  • labels (Dict[str, float]) – A {old_value: new_value} mapping; defaults to coercing the cell values to numbers.

  • default (float) – Default value for old values not mentioned in labels. If not specified, old values missing from labels will raise a KeyError.

  • name (str) – Name of the output Var (default is current name).

Return type:

Var