I created an svm formula using my training data:
library(e1071)
modeltrain <- svm(Y~ X1 + as.factor(X2) + X3, data=traindata,
type="nu-regression",kernel="radial",cross=10, nu = 0.30, gamma=0.1)
Which I then use to generate predictions in my test data:
predict(modeltrain, testdata)
This has worked just fine on multiple machines, but when I send this formula to one of my collaborators and he tries to run the 'predict' function, he gets the following error:
"Error in predict.svm(modelcold, cold) : object 'R_svmpredict' not found"
Note that: - there is no missing in his test data - all variables have been checked and they match the training data - he has both the latest versions of R and Rtudio installed - we've tried loading different versions of the model and restarting RStudio
I've searched online for help but the one answer I found was confusing: Object not found error when passing model formula to another function
Frankly, we're both stumped. Any feedback would be greatly appreciated.
--- As requested, adding sessionInfo() output:
R version 3.4.2 (2017-09-28) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 > LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] mgcv_1.8-20 nlme_3.1-131 e1071_1.6-8 dplyr_0.7.4 foreign_0.8-69
loaded via a namespace (and not attached): [1] Rcpp_0.12.13 lattice_0.20-35 class_7.3-14 assertthat_0.2.0 > grid_3.4.2 R6_2.2.2 magrittr_1.5 rlang_0.1.2 bindrcpp_0.2
[10] Matrix_1.2-11 tools_3.4.2 glue_1.1.1 compiler_3.4.2 >pkgconfig_2.0.1 bindr_0.1 tibble_1.3.4
sessionInfo()
? – LyngbakrsessionInfo()
. Also, could he reproduce the error with another dataset? This would help determine if it's a problem specific to the dataset, as opposed to the functions/packages. – Lyngbakr