title: R: Grouped boxplot with 2 X-variables, in each group compare all samples vs. one X2 group
body: <p>I am trying to generate a grouped boxplot in ggplot2 with two x variables. This is straight-forward with</p>
  
  <pre><code>ggplot(boxplot_classes, aes(x=Group, y=Value, fill=Mutation)) + 
  geom_boxplot(position=position_dodge(0.8))
  </code></pre>
  
  <p>However, I do not need to compare the two subgroups defined by the second x-variable, but for each group defined by the first x-variable, I need to compare all samples in this group with one single subgroup from the second x variable. </p>
  
  <p>Here an example. The data looks like this:</p>
  
  <pre><code>Value   Mutation    Group
  32.00   Yes 1
  5.00    no  1
  18.00   no  1
  3.00    no  1
  16.00   no  1
  14.00   Yes 1
  28.00   Yes 1
  28.00   Yes 1
  49.00   Yes 1
  15.00   Yes 1
  43.00   no  2
  49.00   Yes 2
  40.00   Yes 2
  17.00   Yes 2
  9.00    no  2
  31.00   Yes 2
  8.00    Yes 2
  43.00   no  2
  50.00   Yes 2
  48.00   Yes 2
  11.00   Yes 3
  42.00   no  3
  0.00    Yes 3
  15.00   Yes 3
  8.00    no  3
  1.00    Yes 3
  41.00   no  3
  15.00   no  3
  4.00    no  3
  31.00   Yes 3
  </code></pre>
  
  <p>I would like to generate a figure, were in each "Group" (in the example above: 1, 2, 3) two boxplots are generated: one for all samples in this "Group" and one only for those samples in this group, which also have mutation=="Yes". In the real data, many more "Groups are present".</p>
  
  <p>I hope I could explain my problem well. Unfortunately I am somehow missing what the correct syntax is or how the data has to be rearranged. </p>
  
  <p>Thank you very much for any help!</p>
  
  <p>EDIT: I uploaded an example of the figure I am trying to generate at <a href="https://s28.postimg.org/hvq8pb25p/Folie1.jpg" rel="nofollow noreferrer">https://s28.postimg.org/hvq8pb25p/Folie1.jpg</a></p>