## Not run:
# # load iris dataset
# data(iris)
#
# # linear discriminant analysis with no validation
# my_lin1 = linDA(iris[,1:4], iris$Species)
# my_lin1$confusion
# my_lin1$error_rate
#
# # linear discriminant analysis with cross-validation
# my_lin2 = linDA(iris[,1:4], iris$Species, validation="crossval")
# my_lin2$confusion
# my_lin2$error_rate
#
# # linear discriminant analysis with learn-test validation
# learning = c(1:40, 51:90, 101:140)
# testing = c(41:50, 91:100, 141:150)
# my_lin3 = linDA(iris[,1:4], iris$Species, validation="learntest", learn=learning, test=testing)
# my_lin3$confusion
# my_lin3$error_rate
# ## End(Not run)
Run the code above in your browser using DataLab