title: Create a bar plot calculating separate percentages for each facet_wrap clusters
body: <p>I have a dataset (df) with three variables: 
  Two groups of people (A/B) perform a 3 types of tasks. The response might be correct (1) or incorrect (0).
  Find attached: </p>
  
  <pre><code> Group Type Response
       B    3        0
       A    1        1
       A    2        1
       B    1        0
       A    1        1
  </code></pre>
  
  <p>I have created the next bar_plot using ggplot:</p>
  
  <pre><code>    ggplot(df,aes(x = factor(Type), fill = factor(Response), y = (..count..)/sum(..count..))) +
    geom_bar() +
    stat_count(geom = "text",
               aes(label = paste(round((..count..)/sum(..count..)*100), "%")),
               vjust = 1) +
    scale_y_continuous(labels = percent)+
    facet_wrap(~Group)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QcxXQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QcxXQ.png" alt="enter image description here"></a></p>
  
  <p>I would like to have separate calculation of % for each Group and Response. E.g,  the sum of the % in group A in correct responses should be 100%, and so on.
  Any ideas/suggestions? </p>
  
  <p>I have tried the next options, without success:</p>
  
  <pre><code>    ggplot(df,aes(x = factor(Type))) +
    geom_bar(aes(y = ..density.., group= Response)) +
    stat_count(geom = "text",
               aes(label = paste(round((..count..)/sum(..count..)*100), "%")),
               vjust = 1) +
    scale_y_continuous(labels = percent)+
    facet_wrap(~Group)
  </code></pre>
  
  <p>error: Error in eval(expr, envir, enclos) : object 'density' not found</p>
  
  <pre><code>    ggplot(df, aes(x=Type, y=Response, fill=Response)) +
    geom_bar(stat="identity") +
    ylab("percent") + 
    facet_wrap(~ Group)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wMKKZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wMKKZ.png" alt="enter image description here"></a> </p>