RapidMiner

Why date data is missing after output from Execute R

Contributor II

Why date data is missing after output from Execute R

Hi 

I am trying to pass the data table to Execute R,  and want to get back with extra additional attributes generated by R. But when I pass data table to Execute R and get the out put form Execute R, found out that Date attribute is missing.

1. Save the data in local repositiory with date data type.

2. Just simply multiply (output directly and the other pass to Execute R)

3. Simple do nothing Execute R script

4. Output from R script

5. Output from direct Multiply

Anyone could give me an advice, how I can get the data table as it is from Execute R Script.

 

Thanks.
Rapidminer_ExecuteR.png

5 REPLIES
Community Manager

Re: Why date data is missing after output from Execute R

hello @zeno_mas - could you please post your process so we can take a look at it?  Please use the </> tool above.

 

Thanks.

Scott

Scott Genzer
Senior Community Manager
RapidMiner, Inc.
Contributor II

Re: Why date data is missing after output from Execute R


<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001"> <context> <input/> <output/> <macros/> </context> <operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process"> <parameter key="logverbosity" value="init"/> <parameter key="random_seed" value="2001"/> <parameter key="send_mail" value="never"/> <parameter key="notification_email" value=""/> <parameter key="process_duration_for_mail" value="30"/> <parameter key="encoding" value="SYSTEM"/> <process expanded="true"> <operator activated="true" class="retrieve" compatibility="7.6.001" expanded="true" height="68" name="Retrieve Data" width="90" x="45" y="34"> <parameter key="repository_entry" value="../data/AMZN_Historical_dt"/> </operator> <operator activated="true" class="multiply" compatibility="7.6.001" expanded="true" height="103" name="Multiply (3)" width="90" x="179" y="34"/> <operator activated="true" class="r_scripting:execute_r" compatibility="7.2.000" expanded="true" height="82" name="Execute R" width="90" x="313" y="85"> <parameter key="script" value="# rm_main is a mandatory function, &#10;# the number of arguments has to be the number of input ports (can be none)&#10;rm_main = function(data)&#10;{&#10;&#9;return(data)&#10;}&#10;"/> </operator> <connect from_op="Retrieve Data" from_port="output" to_op="Multiply (3)" to_port="input"/> <connect from_op="Multiply (3)" from_port="output 1" to_port="result 1"/> <connect from_op="Multiply (3)" from_port="output 2" to_op="Execute R" to_port="input 1"/> <connect from_op="Execute R" from_port="output 1" to_port="result 2"/> <portSpacing port="source_input 1" spacing="0"/> <portSpacing port="sink_result 1" spacing="0"/> <portSpacing port="sink_result 2" spacing="0"/> <portSpacing port="sink_result 3" spacing="0"/> </process> </operator> </process>

@sgenzer Thanks for the quick.

Attachments

Moderator

Re: Why date data is missing after output from Execute R

Try converting your date column from a RapidMiner Date type to Polynominal type. 

 

Sometimes when converting from RM > R, the date times get wonky. 

Contributor II

Re: Why date data is missing after output from Execute R

Thank you for your suggestion @Thomas_Ott.

Yep, that is one of the workable workaround, in fact I actually started with that and inside Excute R still can detact as date data type.

Do you think it is worth to report an issue to RM team?

 

Rgds,

Highlighted
Community Manager

Re: Why date data is missing after output from Execute R

hi @zeno_mas - just curious.  What are you trying to do in R that cannot be done with RapidMiner operators?

 

Scott

Scott Genzer
Senior Community Manager
RapidMiner, Inc.