installs RLink.

Details and Options

  • InstallR must be called before any work can be done with the RLink.
  • The following options can be given:
  • "JRELocation"Automaticpath to a custom Java Runtime Environment (JRE)
    "TargetPlatform"Automaticname of the platform, if different from $SystemID
    "RCommandLine"Automaticlist of strings starting with "--" and representing command-line arguments for R
    "RHomeLocation"Automaticlocation of the root of an external R distribution (currently Windows only)
    "AddToRDataTypePath"Nonelist of directories with external data type definitions
    "EnableResourcesAutoinstall"Trueenables automatic download and installation of the RLinkRuntime paclet, if the latter has not yet been installed
  • The "TargetPlatform" option should only be used under rather special circumstances, such as when you would like to use the 32-bit version of R on a 64-bit machine (note that in such a case, you will also need to use the "JRELocation" option, to indicate the path to 32-bit JRE).
  • If the R runtime has been already installed, InstallR does nothing.
  • If "RHomeLocation" is set to a specific location, this enables RLink to use external R distribution, where the specified location should correspond to the setting of the R_HOME variable (point at the root of R distribution). This option is currently supported on Windows only.
  • RLink searches in directories specified with "AddToRDataTypePath" for external data type definitions, for user-defined data types extending core RLink type system. When found, such definitions are loaded by InstallR and registered with RLink.
  • If the RLinkRuntime paclet (which contains R distribution bundled with RLink) has not yet been installed on your system, and if the "EnableResourcesAutoinstall" option is set to True, the RLinkResourcesInstall function is automatically called by InstallR. This does not happen, however, if you indicate the location of your own R distribution with the "RHomeLocation" option.


Basic Examples  (1)

This loads the RLink package:

This configures RLink and installs the R runtime:

You can now start working:

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


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


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


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


@misc{reference.wolfram_2022_installr, author="Wolfram Research", title="{InstallR}", year="2012", howpublished="\url{https://reference.wolfram.com/language/RLink/ref/InstallR.html}", note=[Accessed: 28-May-2023 ]}


@online{reference.wolfram_2022_installr, organization={Wolfram Research}, title={InstallR}, year={2012}, url={https://reference.wolfram.com/language/RLink/ref/InstallR.html}, note=[Accessed: 28-May-2023 ]}