RLink`
RLink`

InstallR

InstallR[opts]

installs RLink.

更多信息和选项

  • 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.

范例

基本范例  (1)

This loads the RLink package:

This configures RLink and installs the R runtime:

You can now start working:

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

文本

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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