The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"non numeric argument to binary operator" when running R in Rapidminer
Hi ! I am trying to run a simple logistic regression between Promotion (Binary) and Stats(Binary). The code works in R, but when I try to replicate the code in Rapidminer's R extension, it gives the following error message.
CODE (have tried multiple options)
logModel <- glm(Promotion ~ Stats,family="binomial"('logit'),data =data)
logModel <- glm(formula=Promotion ~ Stats,family=binomial(logit),data =data)
I have done preprocessing - (a) naming Promotion as "label", "binomial", (b) nominal to numerical transformation (c) selecting attributes, set role.
Still I end up with the following ERROR
non numeric argument to binary operator
Any suggestions/tips appreciated in advances.
CODE (have tried multiple options)
logModel <- glm(Promotion ~ Stats,family="binomial"('logit'),data =data)
logModel <- glm(formula=Promotion ~ Stats,family=binomial(logit),data =data)
I have done preprocessing - (a) naming Promotion as "label", "binomial", (b) nominal to numerical transformation (c) selecting attributes, set role.
Still I end up with the following ERROR
non numeric argument to binary operator
Any suggestions/tips appreciated in advances.
Tagged:
0
Answers
one possible problem might be that when loading the data into R, the classes are not correctly identified as factors in the data frame.
I tried to reproduce your problem (see the code below) and I had also to set the Promotion label as factor in the R script.
Best,
David