Am new to R, tried to create a SVM Model with Linear Kernel.
Here is the code:
svm.narrow.margin <- svm(Diagnosis~., data = biomed, type = "C-classification", cost = 1.0, kernel = "linear")
However it returns this error message:
Error in if (any(as.integer(y) != y)) stop("dependent variable has to be of factor or integer type for classification mode.") : missing value where TRUE/FALSE needed In addition: Warning message: In svm.default(x, y, scale = scale, ..., na.action = na.action) : NAs introduced by coercion
I ran the same set of codes on R Studio Cloud and it works fine which is confusing.