Skip to content

setcats

Replace the category set of a categorical array.

B = setcats(A, newcats)

Returns A with its category set entirely replaced by newcats. Data values that don’t appear in newcats become <undefined>.

setcats(categorical({'a','b','c'}), {'a','b'})
  • addcats — Add categories to a categorical array.
  • removecats — Remove categories from a categorical array.
  • isundefined — Test which categorical entries are undefined.