if(requireNamespace('mlbench')&requireNamespace('MASS')){
data('Vowel',package='mlbench')
acc <- CVcluster(formula=Class ~., id = V1, data = Vowel, nfold = 15, FUN = MASS::lda,
predictFUN=function(x, newdata, ...)predict(x, newdata, ...)$class,
printit = TRUE, cvparts = NULL, seed = 29)
}
Run the code above in your browser using DataLab