RAttributes[atts]
an RLink container for attributes of R objects.
RAttributes
RAttributes[atts]
an RLink container for attributes of R objects.
Details and Options
- 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.
- RAttributes 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 RAttributes in the short form of R object representation, but is included in the long (full) form.
Examples
Basic Examples (3)
Needs["RLink`"]
InstallR[]This represents the full internal form of a matrix:
vecff = RVector["integer", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
RAttributes["dim" :> RVector["integer", {2, 5}, RAttributes[]]]]This is equivalent to the following short form:
FromRForm[vecff]The following expression represents the full internal form of an R vector with an additional names attribute:
vecAttff =
RVector["integer", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
RAttributes["dim" :> RVector["integer", {2, 5}, RAttributes[]],
"names" :>
RVector["character", {"a", "b", "c", "d", "e", "f", "g", "h", "i",
"j"}, RAttributes[]]
]]This is equivalent to the following short form:
FromRForm[vecAttff ]You can send this vector to R:
RSet["vecAtt", vecAttff ]This returns the attributes of the vector used above, fetched from R:
atts = REvaluate["attributes(vecAtt)"]Looking at the internal form of this answer, you can see that in R, attributes are stored in a list:
ToRForm[atts]Tech Notes
Text
Wolfram Research (2012), RAttributes, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RAttributes.html.
CMS
Wolfram Language. 2012. "RAttributes." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RAttributes.html.
APA
Wolfram Language. (2012). RAttributes. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/RLink/ref/RAttributes.html
BibTeX
@misc{reference.wolfram_2026_rattributes, author="Wolfram Research", title="{RAttributes}", year="2012", howpublished="\url{https://reference.wolfram.com/language/RLink/ref/RAttributes.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_rattributes, organization={Wolfram Research}, title={RAttributes}, year={2012}, url={https://reference.wolfram.com/language/RLink/ref/RAttributes.html}, note=[Accessed: 13-June-2026]}