RLink`
RLink`

RTypeOfLowLevelExpression

RTypeOfLowLevelExpression[expr]

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

Details and Options

  • expr must be an RLink internal form of some valid RLink representation of an R object (in contrast with RTypeOfHighLevelExpression, which expects a higher-level end user representation of an R object).
  • If expr matches the pattern of one of the currently registered extended RLink data types, RTypeOfLowLevelExpression[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 expr is not a valid low-level RLink representation of an R object, RTypeOfLowLevelExpression[expr] returns None.
  • 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.)

Examples

Basic Examples  (1)

The following queries the type for a low-level RLink representation of a vector of integers:

Here is a low-level representation of a simple data frame, which is an extended data type:

You can query its type:

The following queries the type for an expression that is not a valid low-level R object representation:

But it is a valid high-level R object representation:

Wolfram Research (2012), RTypeOfLowLevelExpression, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RTypeOfLowLevelExpression.html.

Text

Wolfram Research (2012), RTypeOfLowLevelExpression, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RTypeOfLowLevelExpression.html.

CMS

Wolfram Language. 2012. "RTypeOfLowLevelExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RTypeOfLowLevelExpression.html.

APA

Wolfram Language. (2012). RTypeOfLowLevelExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/RLink/ref/RTypeOfLowLevelExpression.html

BibTeX

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

BibLaTeX

@online{reference.wolfram_2023_rtypeoflowlevelexpression, organization={Wolfram Research}, title={RTypeOfLowLevelExpression}, year={2012}, url={https://reference.wolfram.com/language/RLink/ref/RTypeOfLowLevelExpression.html}, note=[Accessed: 29-March-2024 ]}