ToEntity

ToEntity[expr]

returns an entity object corresponding to the given expression.

ToEntity[expr,type]

returns an entity object of the specified type corresponding to expr.

Details

  • ToEntity evaluates for Wolfram Language expressions corresponding to entities of type "Character", "Color", "Graph", "MathematicalFunction", and "WolframLanguageSymbol".

Examples

open allclose all

Basic Examples  (5)

Convert characters to entities:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//InputForm=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]//InputForm=
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]//InputForm=

Convert colors to entities:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//InputForm=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]//InputForm=

Convert undirected graphs to entities:

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

Use ToEntity for "MathematicalFunction" entity discovery:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]//InputForm=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]//InputForm=
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]//InputForm=

Convert a Wolfram Language symbol to an entity:

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

Scope  (5)

Applications  (1)

Properties & Relations  (4)

Possible Issues  (3)

Neat Examples  (2)

See Also

FromEntity  Entity  EntityValue  CanonicalName  ColorData  GraphData  WolframLanguageData

Introduced in 2014
(10.0)
| Updated in 2015
(10.3)