I need to generate a barplot which consists of the following:
I have a csv file with columns: Category Reason Time Value
- Category has 7 possible names (c1 ... c7)
- Reason has 8 possible names (n1 ... n8)
- Time has 2 possible names (T1, T2)
- Value is the time value
Example dataset:
Category    Reason  Time    Value
C1  R1  T1  1
C2  R1  T2  2
C1  R2  T1  3
C2  R2  T2  4
C1  R3  T1  8
C2  R3  T2  0
What i want to achieve: A bar plot which consists of 3 groups (i.e. one group per REASON), where each group consists of 2 stacked bars (i.e. a bar for each CATEGORY), where each bar depicts T1 and T2 on top of it.
I guess i need something similar as R: bar plot with two groups, of which one is stacked, but unfortunately i'm very new to R.
Similar to this picture, which has in terms of my example:
- 5 categories
- 3 reasons
- 4 times values
- % as a time value
Any help is appreciated.

 
     
     
    
