How to resolve argument of length 0 error while using boosting in R


I am trying to implement adaboost for one of the problems but am being hit by an un-understandable error :stuck_out_tongue:

> churn.boost <- ~ ., data = churn,v = 10,boos = T,
+                            mfinal = 10,control = rpart.control(cp = 0.05))
Error in 1:nrow(object$splits) : argument of length 0 

What does this error mean and how do I rectify it??

for output column do as.factor

train$target ← as.factor(train$target)