[R] Problem in using train() function in Caret

Chaoyang Li c||35 @end|ng |rom |@u@edu
Tue Apr 2 04:56:51 CEST 2019


Hi, Everyone,
I have another question with using train() function in Caret package. When I coded 
tree.spam.cv <- train(Label~., data = train_spam_toke_df, methods = "rpart", trControl = cv_spam_control, 
                   tuneLenght = 7)
it gave the error as follow,
Error in terms.formula(formula, data = data) : 
  duplicated name 's.i.m' in data frame using ‘.'
I am not sure if there is any bug with my software. I used to have no problem when I wrote lm(y~., data = data1)

Can someone help me with this problem? Thank you so much!

Chaoyang


More information about the R-help mailing list