🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

R script terminated anormally

User: "kcallan"
New Altair Community Member
Updated by Jocelyn

I am trying to run a simple R script to gather data using the dplyr package, which is installed in my R sintallation I get the message that the script terminated abnormally. The full error:

Exception: com.rapidminer.operator.OperatorException
Message: Script terminated abnormally.
Stack trace:

com.rapidminer.extension.rscripting.operator.scripting.AbstractScriptRunner.run(AbstractScriptRunner.java:166)
com.rapidminer.extension.rscripting.operator.scripting.AbstractScriptingLanguageOperator.doWork(AbstractScriptingLanguageOperator.java:90)
com.rapidminer.extension.rscripting.operator.scripting.r.RScriptingOperator.doWork(RScriptingOperator.java:73)
com.rapidminer.operator.Operator.execute(Operator.java:1025)
com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:77)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:812)
com.rapidminer.operator.ExecutionUnit$2.run(ExecutionUnit.java:807)
java.security.AccessController.doPrivileged(Native Method)
com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:807)
com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:428)
com.rapidminer.operator.Operator.execute(Operator.java:1025)
com.rapidminer.Process.execute(Process.java:1315)
com.rapidminer.Process.run(Process.java:1290)
com.rapidminer.Process.run(Process.java:1181)
com.rapidminer.Process.run(Process.java:1134)
com.rapidminer.Process.run(Process.java:1129)
com.rapidminer.Process.run(Process.java:1119)
com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)

R script:

 

# rm_main is a mandatory function, 
# the number of arguments has to be the number of input ports (can be none)
rm_main = function(data)
{


# your code goes here
library(dplyr)
data_long <- gather(data, stage, avg_weeks, average(lodgedCouncilToCertification_Weeks): average(SOCToRegistration_Weeks), factor_key=TRUE)

# connect output port to see the results
return(data_long)
}

 

Find more posts tagged with