How do I turn the dataset to this chart with ggplot?

Hi, I am trying to create a visualization on r using gg plot using the dataset on the left , but I am unable to do it no matter how I tried. Could someone show me an illustration?

  1. *How can I transform this data to use it in ggplot function and create a bar chart that shows sum of A in a bar, Sum of B in another bar, and Sum of C in another bar.

  2. Then I would want to create another bar chart with A+B stacked in 1 bar and C in another, just like the image below.

did you get as far as making a dataframe ?