categorical

Methods

Method Reference: categorical.ismissing

categorical: out = ismissing (C)
categorical: out = ismissing (C, indicator)

Find missing elements in categorical array.

TF = ismissing (C) returns a logical array TF of the same size as C containing true for each corresponding element of C that does not have a value from one of the categories in C and false otherwise.

TF = ismissing (C, indicator) also returns a logical array TF containing true for each corresponding element of C that does not have a value from one of the categories specified in indicator and false otherwise.

indicator must be either a categorical array or a character vector or a string vector or a cell vector of character vectors. When the indicator contains text representation, the comparison is based on lexicographical equality to the category names of C.

Source Code: categorical

Example: 1

For a categorical array ismissing is the same test as isundefined: the missing value is the <undefined> element. It exists so categoricals plug into the generic missing-data tools (rmmissing, standardizeMissing).

 C = categorical ({'M'; ''; 'L'})
C =
  3x1 categorical array

    M              
    <undefined>    
    L
 ismissing (C)
ans =

  0
  1
  0