R is a programming language and software environment for statistical computing and graphics. R is an open-source project, and a result of a large community effort. More information about R can be found at

Mathematica Functions

This describes the Mathematica functions provided by RLink.

RLink Installation

InstallRconfigure and install RLink and load the R runtime
UninstallRuninstall the R runtime
RLinkResourcesInstalldownload and install the RLinkRuntime paclet if necessary
RLinkResourcesUninstalluninstall all versions of the RLinkRuntime paclet previously installed

Functions related to the installation of RLink.

RLink Internal and Short Forms of R Data Representation

RVectorrepresent the R vector internally
RListrepresent the R list internally
RNullrepresent the R NULL object internally
REnvironmentrepresent the R global environment
RCoderepresent R objects not directly supported by RLink
RFunctionrepresent the R function reference
RAttributesrepresent attributes for an R object, both internally and in the short form
RObjectrepresent a generic R object (usually with a non-empty set of attributes) in the short form

Data containers, used as building blocks to form the internal and short forms of RLink representation of R objects.

Conversion between Short and Long Forms of Data Representation

ToRFormconvert the short form to a long internal form of RLink data representation
FromRFormconvert the internal form to a short form of RLink data representation

Functions to realize data conversion between short and long (internal) forms of RLink data representation.

Data Exchange between Mathematica and R, R Code and Functions Execution

RSettransfer Mathematica data to R and assign it to some variable or expression in the R workspace
REvaluateevaluate a string of R code and get the result to Mathematica
RFunctionwhen given arguments, execute a function in the R workspace to which it is a reference, with those arguments, and return a result back to Mathematica

Functions to exchange data between R and Mathematica, execute strings of R code, or R functions.

RLink Data Type Extension System

RDataTypeRegisterregister an extended data type definiton with RLink
RDataTypeUnregisterunregister an extended data type
RDataTypeDefinitionsReloaddynamically reload all available extended data type definitions, making their current versions available in the current RLink session
$RDataTypePathstore the path (list of directories) where RDataTypeDefinitionsReload looks for extended type definitions
RDataTypeRegisteredQtest whether or not an extended data type with a given name is currently registered with RLink
RTypeOfHighLevelExpressionreturn the name of the data type, an instance of which is represented by a given expression (high-level representation)
RTypeOfLowLevelExpressionreturn the name of the data type, an instance of which is represented by a given expression (low-level representation)

Functions adding support for registering user-defined extended data types with RLink and getting information about them.

New to Mathematica? Find your learning path »
Have a question? Ask support »