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", "WolframLanguageSymbol", and "Graph".

Examples

open allclose all

Basic Examples  (4)

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]=

Convert a function into 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  (3)

Applications  (1)

Properties & Relations  (4)

Possible Issues  (2)

Neat Examples  (2)

See Also

FromEntity  Entity  EntityValue  CanonicalName  ColorData  GraphData  WolframLanguageData

Introduced in 2014
(10.0)