|
SOLUTIONS
|
RAttributes
RAttributes[atts]
an RLink container for attributes of R objects.
DetailsDetails
- atts must be a sequence of zero, one, or more delayed rules, of the form name :> value, where name must be a string name of an attribute, and value can be any valid R object representation, which RLink can handle.
is not normally used as a standalone expression, but rather as a part of expressions with heads RVector or RList.- For R vectors, the attribute dim is not included in
in the short form of R object representation, but is included in the long (full) form.
ExamplesExamplesopen allclose all
Basic Examples (3)Basic Examples (3)
| In[1]:= |
This represents the full internal form of a matrix:
| In[1]:= |
| Out[1]= |
This is equivalent to the following short form:
| In[2]:= |
| Out[2]= |
The following expression represents the full internal form of an R vector with an additional names attribute:
| In[1]:= |
| Out[1]= | ![]() |
This is equivalent to the following short form:
| In[2]:= |
| Out[2]= |
You can send this vector to R:
| In[3]:= |
| Out[3]= | ![]() |
This returns the attributes of the vector used above, fetched from R:
| In[4]:= |
| Out[4]= |
Looking at the internal form of this answer, you can see that in R, attributes are stored in a list:
| In[5]:= |
| Out[5]= | ![]() |
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »




