enter code here library(class) library(caret) b_data <- b[,-1] b_data <- mutate(b_data, dia = fct_recode(b$ventas)) b$ventas <- as.factor(b$ventas)