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.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Convert characters to entities:

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

Convert colors to entities:

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

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]=
Introduced in 2014
(10.0)