Where do the results of R-Scripts go? Configuration problem for RapidMiner Studio only?
MPB_
New Altair Community Member
Hi there,
I am struggling with exporting results from the Execute R Script Operator.
INFO: No filename given for result file, using stdout for logging results!
Mar 04, 2020 10:36:58 AM com.rapidminer.Process execute
INFO: Process //Aggr/R_test starts
Mar 04, 2020 10:36:58 AM com.rapidminer.Process saveResults
INFO: Saving results.
Mar 04, 2020 10:36:58 AM com.rapidminer.Process execute
I am struggling with exporting results from the Execute R Script Operator.
Here is how the script and the process look like :
After the process is successfully done, I only get The result
Memory buffered file
However, there is no file written.
The RapidMiner log only says
Mar 04, 2020 10:36:58 AM com.rapidminer.Process execute
INFO: Process //Aggr/R_test starts
Mar 04, 2020 10:36:58 AM com.rapidminer.Process saveResults
INFO: Saving results.
Mar 04, 2020 10:36:58 AM com.rapidminer.Process execute
INFO: Process //Aggr/R_test finished successfully after 0 s
Since the code is running without any errors and with the expected results in R-Studio, I think it must be a configuration issue
What did I do wrong?
1
Best Answer
-
Hi @MPB_,
It is easy to get the location of your output file.
Just add getwd() in your scripts
Check your Log view, there should be a temp folder that store your sink file.
Why?
Because in your scripts, you used a relative location instead of specifying a physical location in your system. I would suggest using a complete file path like "C:\\Users\\MPB\Documents\\Routput\\outputsink.txt" for the output text file.sink("where_is_that_text.txt")
3
Answers
-
@MPB_
So, you can view your model summary in "Log" window of rapidminer (VIEW --> Show Panel --> Log). The output of R script when connected to result port will only display example sets and others like models will be displayed as memory buffer files. I think you should use a return function if you are planning to output a data frame.
@yyhuang can help you more with this.
1 -
Hi @varunm1 ,thank you very much for your reaction.In this case, I explicitly want to write a new file. I do not need to see any results in RapidMiner, but a .txt-File written into a directory on my computer would be amazing.Unfortunately, a return function is not doing the job,@yyhuang gave me the very great advice to use a sink function.
The sink function works perfectly fine in R(studio) and writes a new file, but does not in RapidMiner.
1 -
Hi @MPB_,
It is easy to get the location of your output file.
Just add getwd() in your scripts
Check your Log view, there should be a temp folder that store your sink file.
Why?
Because in your scripts, you used a relative location instead of specifying a physical location in your system. I would suggest using a complete file path like "C:\\Users\\MPB\Documents\\Routput\\outputsink.txt" for the output text file.sink("where_is_that_text.txt")
3