How do I group the below sample of data by Gender and compute means for each of the genre columns within these groups considering only those values greater than 1? Ultimately I want to plot a bar chart with genres on the horizontal independent to each other, each characterized by two bars corresponding to each gender classification.
Action |Adventure |Animation |Children| Comedy | Gender
0 | 5 | 0 | 0 | 0 | M
0 | 0 | 1 | 2 | 3 | M
2 | 3 | 0 | 0 | 4 | F
0 | 0 | 0 | 2 | 0 | M
4 | 0 | 3 | 0 | 2 | F
4 | 4 | 0 | 0 | 0 | F
I'm aware of varipus possible ways of going about this problem but am looking for a compact code that can be executed in ggplot or other plot functions directly rather than having to do pre-processing the data and then using these to plotting. However, any smart approach is welcomed.