🎉 🎉 RAPIDMINER 9.10 IS OUT!!! 🎉🎉

Download the latest version helping analytics teams accelerate time-to-value for streaming and IIOT use cases.

CLICK HERE TO DOWNLOAD

R script: backslash \ in file_path macro cannot be parsed

Fred12Fred12 Member Posts: 344   Unicorn

hi,

In rapidminer, the file_path macro is used with single backslashes , not double "\\"" or "/" like usual in R.

Therefore, the path cannot be read by the R script.

I tried to do some conversion like

<SPAN class="pln">normalizePath</SPAN><SPAN class="pun">(</SPAN><SPAN class="pln">example.csv</SPAN><SPAN class="pun">,</SPAN><SPAN class="pln"> winslash </SPAN><SPAN class="pun">=</SPAN> <SPAN class="str">"/"</SPAN><SPAN class="pun">)</SPAN>

 

<SPAN class="pln">gsub</SPAN><SPAN class="pun">(</SPAN><SPAN class="str">"\\"</SPAN><SPAN class="pun">,</SPAN> <SPAN class="str">"/"</SPAN><SPAN class="pun">,</SPAN><SPAN class="pln"> example.csv</SPAN><SPAN class="pun">,</SPAN><SPAN class="pln"> fixed </SPAN><SPAN class="pun">=</SPAN> <SPAN class="lit">TRUE</SPAN><SPAN class="pun">)</SPAN>

but nothing worked...I would like to use file_path macro to create an excel file in the same directory..

 

Dec 16, 2016 11:09:47 PM INFO: [1] "Failed to parse the script."
Dec 16, 2016 11:09:47 PM INFO: [1] "'\\U' ohne Hex-Ziffern in der Zeichenkette beginnend mit \"\"C:\\U\" genutzt"
 

Sign In or Register to comment.