Skip to Content
Former Member
May 31, 2016 at 12:33 PM

R-Component Save Option


Hello Everyone,

I am trying to generate some new R-Components for PA Expert Mode. If I try to use the feature of saving the model, I get always the error MODEL_PARAMS_CHECK_WARNING.

I have tried some SAP examples and get the same error message for the following code



finalString<-paste(paste(DependentColumn,"~" ), IndepenentColumn);

slr_model<-lm(finalString); # calling the "lm" function and storing the output model in "slr_model"

result<-predict(slr_model, InputDataFrame);

output<- cbind(InputDataFrame, result); # combining "InputDataFrame" and "result" to get the final table.


# returnvalue - function must always return a list that contains results("out"), and model variable variable ("slrmodel"), if present.

return (list(slrmodel = slr_model,out=output))


SLRModelScoring<-function (MInputDataFrame, MIndependentColumn, Model)


predicted <-predict (Model, data.frame(MInputDataFrame [, MIndependentColumn]), level=0.95);



and also for this example:

cnrFunction <- function(dataFrame, IndependentColumns, dep)



formattedString <- paste(IndependentColumns, collapse = '+');

finalString <- paste(paste(dep, "~" ), formattedString)

cnr_model <- rpart(finalString, method="class");

output <- predict(cnr_model, dataFrame, type=c("class"));

out <- cbind(dataFrame, output);

return(list(result = out, modelcnr=cnr_model));


cnrFunctionmodel<-function(dataFrame, ind, modelcnr, type)


output <- predict(modelcnr,data.frame(dataFrame[,ind]),type=type);

out <- cbind(dataFrame, output);

return(list(result = out));


Regarding this example I saw that a community member had a similar problem ( I made the suggested changes in the code as the following




out<- cbind(dataFrame, output); return (list(result=out));


But I still get the same error message. I don’t know what I am doing wrong or where the mistake might be. For any help or suggestions I would be very thankful.

Best regards,


Error_Picture.png (32.1 kB)