addcats
Add categories to a categorical array.
Syntax
Section titled “Syntax”B = addcats(A, newcats)B = addcats(A, newcats, 'Before', cat)B = addcats(A, newcats, 'After', cat)Description
Section titled “Description”Returns A with the new categories added (no data values change). For ordinal arrays, the position of the new categories matters — control with the 'Before' / 'After' options.
Example
Section titled “Example”addcats(categorical({'a','b'}), {'c','d'})See also
Section titled “See also”removecats— Remove categories from a categorical array.mergecats— Merge categories of a categorical array.renamecats— Rename categories of a categorical array.reordercats— Reorder the categories of a categorical array.