Questions tagged [rlink]

Questions about integrating Mathematica and the statistics package R using the RLink functionality provided with Mathematica.

Useful links:

68 questions
9
votes
1 answer

What is the current status of RLink? Are there plans for any future development?

RLink has not seen significant changes since it first appeared back in V9 (2012). OTOH, it has a number of issues (existing from the start or accumulated over the years), which make it more difficult to work with. Here is a list of some of…
Leonid Shifrin
  • 114,335
  • 15
  • 329
  • 420
9
votes
1 answer

Getting R textual output into Mathematica

I use Mathematica with R because I am able to keep my code and output organized with the notebook interface. Although I can get R structures into Mathematica using REvaluate, I can't figure out how to get textual output, from…
Eric Brown
  • 4,406
  • 1
  • 18
  • 36
7
votes
2 answers

RLink Java(TM) platform has stopped working

I am trying to send to R a big function,it has only three variables but output is quite big.So when i "translate" that code from mathematica to look like R code and input it in REvaluate i get the popup window thats telling me that java(tm) platform…
4
votes
1 answer

Passing mixed type data to R with Rlink takes enormously long time

I am trying to pass a matrix of 150*4000 real numbers to R with RLink. If I try to pass the whole matrix the process seems to take forever, without stopping for errors. The interesting part is that if i pass the first 606 columns then the data is…
CupiDio
  • 439
  • 2
  • 9
3
votes
0 answers

Can't get ggplot2 to work using RLink

Has anybody managed to call ggplot functions successfully using RLink? I've tried the following in Windows 10 with Mathematica 11.3; In[7]:= Needs@"RLink`" In[11]:= InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.4.1"] In[9]:=…
RobertNathaniel
  • 790
  • 4
  • 12
3
votes
0 answers

InstallR failing in Mathematica 12

I was trying to use R with Mathematica 12 I tried the following: Needs["RLink`"] InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.5.1", "Rversion" ->"3.5"] I am getting this error JLink'Java: A Java exception occurred:…
3
votes
1 answer

RLink: Setting a matrix with constants returns a different matrix

Let's assume I have the following matrix: {{1, 0, τ^-1}, {-κ, 1, 0}, {-(1 - ρr) ψ2, -(1 - ρr) ψ1, 1}, {0, 0, 0}} which is equal to: {{1, 0, 10.}, {-0.2, 1, 0}, {-0.16, -0.32, 1}, {0, 0, 0}} I then do: RSet["gama0", {{1, 0, τ^-1}, {-κ,…
An old man in the sea.
  • 2,527
  • 1
  • 18
  • 26
3
votes
0 answers

How Many of R's Functionalities Are Available From Inside Mathematica?

When R is linked to Mathematica, how many of its functionalities are available from inside of Mathematica?
2
votes
0 answers

Sending RObject to RFunctions

I want to realize function from some R package in Mathematica. First load RLink and package what I need Needs["RLink`"] InstallR["RHomeLocation" -> "c:\\R-2.15.3\\"] REvaluate["library(\"randomForest\")"] then create…
molekyla777
  • 2,888
  • 1
  • 14
  • 28
2
votes
0 answers

Error using InstallR from RLink`

I am writing the code Needs["RLink`"] RLinkResourcesinstall[] and I obtained the output Out[3]= {PacletObject[RLinkRuntime, 9.0.0.0, <>]} Then I tried to install R with InstallR and the output is $Failed I have Windows 10 and the my version of…
DIEGO R.
  • 500
  • 2
  • 6
2
votes
0 answers

Problem Install R on OS 10.14

Using Mathematica 12.1.0.0 on Mac OS 10.14 Attemping to use my version of R Tried using: Needs["RLink`"] JLink`UninstallJava[] InstallR["RVersion" -> "3.61", "RHomeLocation" -> "/Users/james2/opt/anaconda3/envs/Rtest/lib/R/library", …
James
  • 21
  • 1
2
votes
0 answers

RLink Java Issue

I used following: <(*"-Xmx1024m"*)(*"-Xmx2048m"*)(*"-Xmx4096m"*)"-Xmx8192m"]; rPath="C:\\Program…
user13892
  • 9,375
  • 1
  • 13
  • 41
2
votes
0 answers

RLink with R3.5.0 on Windows 10 and Mathematica 10.2 is not working

If I install R with InstallR["RHomeLocation" -> "C:\Program Files\R\R-3.5.0"] the system (Mathematica 10.2 on Windows 10 Pro and R-3.5.0) is giving the following message: Error R.DLL version does not match (DLL 3.5.0, expecting 3.1.1 Regards
2
votes
1 answer

Calling source with RLink in Mathematica

Let's imagine that I have a file called gensys.R where a function gensys is defined, which I would like to use in the mathematica environment and work with it. When using RLink, I've tried REvaluate[ "source(" path\gensys.R ")"] However, I receive…
An old man in the sea.
  • 2,527
  • 1
  • 18
  • 26
2
votes
1 answer

RLink: Cannot get Mathematica and R to look at the same workspace

I am trying to get Mathematica and R to look at the same workspace, but have failed thus far. The task is to produce variables that will be operated upon by either program while the current state of these also can be simultaneously read by both.…
starfish
  • 51
  • 2
1
2