Skip to content

grouptransform

table · scripts/table/grouptransform.m

GROUPTRANSFORM  Transform table variables by group (MATLAB compat).

  B = GROUPTRANSFORM (T, GROUPVARS, METHOD) transforms every non-group
  numeric variable of table T within the groups defined by GROUPVARS.

  B = GROUPTRANSFORM (T, GROUPVARS, METHOD, DATAVARS) transforms only the
  variables named in DATAVARS.

  METHOD is one of 'zscore', 'norm', 'meancenter', 'rescale', or a
  function handle applied to each group's column (returning a vector the
  same length).  The result B has the same height as T.