RLink

R is a programming language and software environment for statistical computing and graphics. RLink is a Mathematica application that uses JLink and RJava / JRI Java libraries to link to the R functionality. It allows the user to communicate the data between Mathematica and R, and execute R code from within Mathematica.

Installation

InstallR launches R runtime and connects it to Mathematica session

UninstallR uninstalls R runtime

RLinkResourcesInstall installs the RLinkRuntime paclet from the Wolfram Data Paclet server

RLinkResourcesUninstall uninstalls the RLinkRuntime paclet

Core Data Types

ToRForm converts an expression to an internal (full) representation used by RLink

FromRForm converts an expression from an internal RLink representation to a more convenient shorter one

RNull  ▪  RVector  ▪  RList  ▪  RObject  ▪  RAttributes  ▪  RCode  ▪  REnvironment  ▪  RFunction

RLink Data Type Extension System

RDataTypeRegister registers an extended data type definition with RLink

RDataTypeUnregister unregisters an extended data type

RDataTypeDefinitionsReload dynamically reloads all available extended data type definitions, making their current versions available in the current RLink session

$RDataTypePath stores the path (list of directories) where RDataTypeDefinitionsReload looks for extended type definitions

RDataTypeRegisteredQ tests whether or not an extended data type with a given name is currently registered with RLink

RTypeOfHighLevelExpression returns the name of the data type, an instance of which is represented by a given expression (high-level representation)

RTypeOfLowLevelExpression returns the name of the data type, an instance of which is represented by a given expression (low-level representation)

Data Exchange and R Code Evaluation

RSet transfers Mathematica data to R and assigns it to a variable or R expression

REvaluate evaluates a piece of code in R and gets the result back into Mathematica

RFunction evaluates an R function on Mathematica expressions passed as arguments and returns the result as a Mathematica expression