# NOT RUN {
data(benchmark.data)
example.data=benchmark.data[[1]]
training.samples=sample(1:nrow(example.data), floor(0.7*nrow(example.data)),replace=FALSE)
C=2^c(-1,1)
#Find the best cost parameter within the provided range if a linear kernel is used
SVM.nfoldcv(example.data[,1:2], as.factor(example.data[,3]),training.samples,C,
'linear',0,0,0,nfold=3)
# }
Run the code above in your browser using DataLab