RAttributes
RAttributes[atts]
an RLink container for attributes of R objects.
更多信息和选项
- 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.
范例
基本范例 (3)
This represents the full internal form of a matrix:
This is equivalent to the following short form:
The following expression represents the full internal form of an R vector with an additional names attribute:
This is equivalent to the following short form:
You can send this vector to R:
This returns the attributes of the vector used above, fetched from R:
Looking at the internal form of this answer, you can see that in R, attributes are stored in a list:
文本
Wolfram Research (2012),RAttributes,Wolfram 语言函数,https://reference.wolfram.com/language/RLink/ref/RAttributes.html.
CMS
Wolfram 语言. 2012. "RAttributes." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RAttributes.html.
APA
Wolfram 语言. (2012). RAttributes. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/RLink/ref/RAttributes.html 年