y <- c(1, 0, 0, 1, 1, 1, 0, 0, 0)
bags <- rep(1:3, each = 3)
classify_bags(y, bags)
classify_bags(y, bags, condense = FALSE)
# works with regular vector too
scores <- 1:9
classify_bags(scores, bags)
Run the code above in your browser using DataLab