> 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
<小时/> 我正在使用插入包。使用列车功能时出错
trainCtrl = trainControl(method='cv', p=1, number=2)
model = train(classe ~ ., data=train[1:10,], method="gbm", trControl=trainCtrl)
requireNamespaceQuietStop中的错误(&#34; e1071&#34;):包e1071是 需要
我可以安装和库()e1071包,但我不知道为什么我必须这样做,如果它表明一些更深层次的问题。我彻底清除了整个R安装并重新安装,但没有修复。
操作系统:Mac Yosemite 10.10.4
R版本:3.2.1_1
插入版本:6.0-52
RStudio版本0.99.467