This constructs a list (vector) of random integers in R:
This makes a contingency table of the above data:
Since the corresponding R object (table) has non-trivial attributes, RObject was used to make it possible to include those.
This constructs an R data frame out of the contingency table:
Here is the full internal form RLink uses to represent the above data frame:
As you can see, RObject is now gone, since heads used in the RLink internal representation of R objects (RVector and RList) can accommodate attributes.
This creates a matrix:
Send it to R:
Assign another attribute to R's mat variable:
Get back a resulting R object:
Since now it has an attribute, RObject was used to represent it. You can also display its attributes:
Note that the "dim" attribute is implicit in the matrix representation in the short form, so its presence does not require the use of RObject. It is, however, explicitly present in the full form: