Missing

Missing[]
represents data that is missing.

Missing["reason"]
specifies a reason for the data's being missing.

Missing["reason",expr]
associates the expression expr with the missing data.

DetailsDetails

  • Missing[] is a symbolic object, with no default evaluation rules defined.
  • Typical examples of include , , , , , , , or .
  • Missing can be returned by most data functions, such as CountryData and ElementData.
  • Missing is returned when a key requested in an Association is not found.
  • Plotting functions automatically omit Missing objects when plotting data.
  • In TraditionalForm, Missing is typically formatted as , with a tooltip specifying the reason.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

When properties are missing, a Missing object is returned:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Missing is generated when an association does not contain the specified key:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Missing elements can be filtered out using DeleteCases:

In[1]:=
Click for copyable input
Out[1]=

Visualization typically automatically filters out Missing elements:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2007
(6.0)
| Updated in 2014
(10.0)