Here are two more:
library(dplyr)df %>% cbind(model.matrix(~ FRUITS + 0, .) == 1)
library(nnet)df %>% cbind(class.ind(.$FRUITS) == 1)
Here are two more:
library(dplyr)df %>% cbind(model.matrix(~ FRUITS + 0, .) == 1)
library(nnet)df %>% cbind(class.ind(.$FRUITS) == 1)