Error in FUN(left, right) : non-numeric argument to binary operator

I'm working witha data base which all has numeric values - I have checked this in excel- and i'm trying to make a decision tree, but just as I try to execute the code:
arbolRpart <- rpart(Clasificador ~ Sexo , data - TC_train)

it always shows me the error:
Error in FUN(left, right) : non-numeric argument to binary operator

I really don't know what else to do,

I will glady acept any help regarding my problem.

Thank you in advance.

I hate it when I do this!

data - TC_train

should have = instead of -

I've learned to look for operators when this happens like < when I meant <-

3 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.