Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

Barplot of a column based on Values of another column

$
0
0

I have something like the following Dataset:

1. Donation 2. Treatment 3. Category. 
2€              TG2           Teenager
1€              TG1           Adult
2€              TG2           Adult
and so on

There are multiple participants. Every Participant is part of a special Treatmentgroup (TG) and is assigned to a category.

I would now like to plot two barplots like this:

  1. Donations of all TGs in one diagram
  2. Donations of all Categories in one diagram

I'm not sure how to do that. If i use barplot(table(Donation)), it gives me the barplot of the donations only. Can I somehow group this data in a barplot?

For example


Viewing all articles
Browse latest Browse all 201945

Trending Articles