"Description missing when running Execute R [SOLVED]"
gunnerli90
New Altair Community Member
I tried to use Execute R to run one of the tutorials-Reading an example set from a file using R. But when I clicked the triangle sign, it pops up an error "Description missing". I am using Windows 8.1 64 bits and I have installed packages "rJava" and "data.table" in my R. I do not know how to configure my R in Rapidminer. Please tell me how to solve this problem.
0
Answers
-
Hi,
can you please post the content of the log as well as your process XML?
With the R Scripting extension the only thing you'd normally have to do is click on the operator and then follow the instructions in the Parameters view to initialize the R connection.
Regards,
Marco0 -
Hi, Marco! I did not see anywhere to set parameters and connect to R after installing Execute R. Below is the log:
Aug 11, 2015 6:39:19 PM INFO: No filename given for result file, using stdout for logging results!
Aug 11, 2015 6:39:19 PM INFO: Loading initial data.
Aug 11, 2015 6:39:19 PM INFO: Process starts
Aug 11, 2015 6:39:19 PM SEVERE: Process failed: No message.
Aug 11, 2015 6:39:19 PM SEVERE: Here:
Aug 11, 2015 6:39:19 PM SEVERE: Process[1] (Process)
Aug 11, 2015 6:39:19 PM SEVERE: subprocess 'Main Process'
Aug 11, 2015 6:39:19 PM SEVERE: +- Retrieve Golf[1] (Retrieve)
Aug 11, 2015 6:39:19 PM SEVERE: ==> +- Execute R[1] (Execute R)
Aug 11, 2015 6:39:19 PM SEVERE: +- Execute R (2)[0] (Execute R)
And the xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.4.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.4.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="6.4.000" expanded="true" height="60" name="Retrieve Golf" width="90" x="112" y="75">
<parameter key="repository_entry" value="//Samples/data/Golf"/>
<description align="center" color="orange" colored="true" width="126">Fetch example data</description>
</operator>
<operator activated="true" class="r_scripting:execute_r" compatibility="6.4.000" expanded="true" height="76" name="Execute R" width="90" x="313" y="75">
<parameter key="script" value="rm_main = function(data) { path = "rapidminer_file_test.csv" # store example data in a file write.csv(data, file = path) # return the path of the file return(path) }"/>
<description align="center" color="green" colored="true" width="126">Save example data in a csv file and hand the file over to the next R operator</description>
</operator>
<operator activated="true" class="r_scripting:execute_r" compatibility="6.4.000" expanded="true" height="76" name="Execute R (2)" width="90" x="447" y="75">
<parameter key="script" value="rm_main = function(myfile) { print('I received the following data set:') data = read.csv(myfile) # print the data we read from the file print(data) # return part of the data return(data[,c("Outlook","Humidity","Play")]) }"/>
<description align="center" color="gray" colored="true" width="126">Read data from the given file and return a part of the data</description>
</operator>
<connect from_op="Retrieve Golf" from_port="output" to_op="Execute R" to_port="input 1"/>
<connect from_op="Execute R" from_port="output 1" to_op="Execute R (2)" to_port="input 1"/>
<connect from_op="Execute R (2)" from_port="output 1" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
0 -
Hi,
that the error message is missing is a bug
But the good news is, you just need to init the connection to R like so:
Regards,
Marco0 -
Thanks Marco! But I do not know the path to R executable because I cannot find the "Rscript.exe". Generally, where does this executable file locate in?0
-
Hi,
mine is located at
C:\Program Files\R\R-3.2.0\bin\Rscript.exe
Windows 8.1
Regards,
Martin0 -
I found the Rscript.exe file but when I clicked the "test" button, it came out another error "'D:/Program' is not recognized as an internal or external command, operable program or batch file". My path is \Program Files\R\R-3.1.1\bin\Rscript.exe0
-
Hi,
what OS are you using? I cannot reproduce the problem on the Windows machines here, but I think I know what you can do to fix it: Add a quote before and after the path, so that it says
in the preferences.
"D:\Program Files\R\R-3.1.1\bin\Rscript.exe"
Regards,
Marco0 -
I am using Windows 8.1 64-bit. I added quotes to my path but the result was still the same. Should I reinstall my R in C drive?0
-
Finally, I solved the problem. For 64-bit OS, I need to use the Rscript.exe file in "x64" folder (there are two Rscript.exe files in "bin"). Anyway, thank you, Marco!0