The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"Description missing when running Execute R [SOLVED]"

gunnerli90gunnerli90 Member Posts: 11 Contributor II
edited June 2019 in Help
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.
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    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,
    Marco
  • gunnerli90gunnerli90 Member Posts: 11 Contributor II
    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)&#10;{&#10;    path = &quot;rapidminer_file_test.csv&quot;&#10;    # store example data in a file&#10;    write.csv(data, file = path)&#10;    # return the path of the file&#10;    return(path)&#10;}"/>
            <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)&#10;{&#10;    print('I received the following data set:')&#10;    data = read.csv(myfile)&#10;    # print the data we read from the file&#10;    print(data)&#10;    # return part of the data&#10;    return(data[,c(&quot;Outlook&quot;,&quot;Humidity&quot;,&quot;Play&quot;)])&#10;}"/>
            <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>
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    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:

    image

    Regards,
    Marco
  • gunnerli90gunnerli90 Member Posts: 11 Contributor II
    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?
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Hi,

    mine is located at
    C:\Program Files\R\R-3.2.0\bin\Rscript.exe
    Windows 8.1

    Regards,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • gunnerli90gunnerli90 Member Posts: 11 Contributor II
    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 D:\Program Files\R\R-3.1.1\bin\Rscript.exe
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    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

    "D:\Program Files\R\R-3.1.1\bin\Rscript.exe"
    in the preferences.

    Regards,
    Marco
  • gunnerli90gunnerli90 Member Posts: 11 Contributor II
    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?
  • gunnerli90gunnerli90 Member Posts: 11 Contributor II
    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!
Sign In or Register to comment.