RLink`
RLink`

RTypeOfHighLevelExpression

RTypeOfHighLevelExpression[expr]

returns a (usually string) name of the RLink data type to which expr belongs.

更多信息和选项

  • If expr is a valid RLink high-level representation of an R object, its type name (usually string) is returned. Otherwise, RTypeOfHighLevelExpression[expr]] returns None.
  • If expr matches the pattern of one of the currently registered extended RLink data types, RTypeOfHighLevelExpression[expr] returns the name of that type. If there is no such match but expr is a valid low-level RLink representation of an R object, "core" is returned.
  • If there is more than one currently registered data type whose pattern matches expr, the name of the type first registered is returned. (Normally, the user who extends the type system should ensure that such type collisions do not occur. The recommended way to guarantee the absence of such collisions is to base the type dispatch/recognition on the "class" attribute of R objects.)

范例

基本范例  (1)

For all R objects of one of the core RLink types, RTypeOfHighLevelExpression returns "core":

Here is an example for the data frame type, which is an extended type implemented via an RLink extension mechanism:

Here is a query for some arbitrary expression not corresponding to any currently registered extended data type or a core RLink data type:

Wolfram Research (2012),RTypeOfHighLevelExpression,Wolfram 语言函数,https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html.

文本

Wolfram Research (2012),RTypeOfHighLevelExpression,Wolfram 语言函数,https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html.

CMS

Wolfram 语言. 2012. "RTypeOfHighLevelExpression." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html.

APA

Wolfram 语言. (2012). RTypeOfHighLevelExpression. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html 年

BibTeX

@misc{reference.wolfram_2024_rtypeofhighlevelexpression, author="Wolfram Research", title="{RTypeOfHighLevelExpression}", year="2012", howpublished="\url{https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html}", note=[Accessed: 15-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rtypeofhighlevelexpression, organization={Wolfram Research}, title={RTypeOfHighLevelExpression}, year={2012}, url={https://reference.wolfram.com/language/RLink/ref/RTypeOfHighLevelExpression.html}, note=[Accessed: 15-November-2024 ]}