I am trying to analyze the data set
data(wine) which is available in the R package
I split the data set according to the proportions
70:30 into a training and a test set.
library(gclus) data("wine") sample_size <- floor(0.70 * nrow(wine)) set.seed(123) train_index <- sample(seq_len(nrow(wine)), size = sample_size) train <- wine[train_index, ] test <- wine[-train_index, ]