> 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