Closed TaikiSan21 closed 5 years ago
would you run traceback() after this error and post the output so I can see where in runBanterModel this is happening?
Oops, yeah that would be useful.
> traceback()
7: eval(predvars, data, env)
6: eval(predvars, data, env)
5: model.frame.default(terms(reformulate(attributes(Terms)$term.labels)),
data.frame(m))
4: model.frame(terms(reformulate(attributes(Terms)$term.labels)),
data.frame(m))
3: randomForest.formula(species ~ ., data = x@model.data, ntree = ntree,
sampsize = sampsize, replace = FALSE, importance = TRUE,
proximity = TRUE)
2: randomForest::randomForest(species ~ ., data = x@model.data,
ntree = ntree, sampsize = sampsize, replace = FALSE, importance = TRUE,
proximity = TRUE)
1: runBanterModel(bntModel, ntree = 5000, sampsize = 2)
Fixed. Detector names and detector predictor column names are now run through make.names
in addBanterDetector
to remove spaces and special characters.
runBanterModel
crashes with an error if there are spaces in the names of your detectors.