Reorder categories in categorical array
B = reordercats(
reorders
the categories in the categorical array, A
)A
, to
be in alphanumeric order.
The order of the categories is used by functions such as summary
and histogram
.
If the categorical array is ordinal, the order of the categories defines
their mathematical ordering. The first category specified is the smallest
and the last category is the largest.
To convert the categorical array, B
,
to an ordinal categorical array, use B = categorical(B,'Ordinal',true)
.
You can specify the order of the categories with B = categorical(B,
,
where the order of the values in valueset
,'Ordinal',true)
defines
the category order.valueset
addcats
| categories
| iscategory
| mergecats
| removecats
| renamecats
| setcats