require (datasets)
data (iris)
# A small grid, so that the example stays fast; the defaults search a much larger one.
SVM (iris [, -5], iris [, 5], gamma = 2^(-2:0), cost = 2^(0:2), tune = TRUE)
# A method with nothing to tune says so.
NB (iris [, -5], iris [, 5], tune = TRUE)
Run the code above in your browser using DataLab