0
> traceback()
9: stop(paste("package", package, "is required"))
8: requireNamespaceQuietStop("e1071")
7: postResample(data[, "pred"], data[, "obs"])
6: ctrl$summaryFunction(testOutput, lev, method)
5: evalSummaryFunction(y, wts = weights, ctrl = trControl, lev = classLevels, 
       metric = metric, method = method)
4: train.default(x, y, weights = w, ...)
3: train(x, y, weights = w, ...)
2: train.formula(classe ~ ., data = train[1:10, ], method = "gbm", 
       trControl = trainCtrl)
1: train(classe ~ ., data = train[1:10, ], method = "gbm", trControl = trainCtrl)
> ?postResample


I am using the caret package. Getting error when using train function
trainCtrl = trainControl(method='cv', p=1, number=2)
model = train(classe ~ ., data=train[1:10,], method="gbm", trControl=trainCtrl)

Error in requireNamespaceQuietStop("e1071") : package e1071 is required

I can install and library() the e1071 package, but I don't know why I have to do that and if it indicates some deeper problem. I wiped out my entire R installation and reinstalled it, but did not fix.


OS: Mac Yosemite 10.10.4

R Version: 3.2.1_1

Caret Version: 6.0-52

RStudio Version 0.99.467

ahoffer
  • 6,347
  • 4
  • 39
  • 68
  • caret doesn't depend on e1071 meaning that it wont load when you load caret, so you will still need to load e1071 on its own, is that what you're asking? – rawr Jul 20 '15 at 17:27
  • I don't understand. Does the error goes away after you install `e1071` or does it still persist? The `caret` library depends on functions from other packages depending on which `method=` you choose. – MrFlick Jul 20 '15 at 17:28

0 Answers0