FromRForm

FromRForm[expr]
converts a full form of an expression expr, representing some valid R object, to the short form. Returns $Failed on illegal expressions, which do not form a valid RLink representation of an R object.

DetailsDetails

  • Performs the reverse operation as compared to ToRForm.
  • Is invoked automatically by REvaluate, as a final step to transform the internal full form of an expression obtained from R to a short form, which is easier to use.
  • While sometimes useful for consistency checks and debugging, it is not expected that this function will be called often.
  • The "cycle" FromRForm[ToRForm[expr]] should always give back the same expression expr (for legitimate expr, representing valid R objects), except when expr is a scalar of one of the primitive types (numeric, string, or logical), in which case it will be "dressed" in an extra List.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

In[1]:=
Click for copyable input

Get a short form of a vector:

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

Or of a matrix:

In[3]:=
Click for copyable input
Out[3]=
New to Mathematica? Find your learning path »
Have a question? Ask support »