I have the following data and would like to create a group boxplot. I created a bargraph in excel and would like to create the boxplot in the exact same way using R (
As far as a boxplot, you would need more than 1 data point, but if you wanted to do a box plot by Fruit, then you could do something like this:
df %>%
pivot_longer(!Fruit) %>%
ggplot(aes(x = Fruit, y = value, fill = Fruit))
geom_boxplot()
Output

