title: Grouped ggplot for adding p-values
body: <p>I'm trying to print the bonferroni p values on top of every grouped bar plot.</p>
  <p>The code that I'm using is:</p>
  <pre><code>stat1 &lt;- stack[1:170,] %&gt;%
  rstatix::group_by(modules) %&gt;%
  rstatix::t_test(values ~ phenotypes) %&gt;%
  rstatix::adjust_pvalue(p.col = &quot;p&quot;, method = &quot;bonferroni&quot;) %&gt;%
  rstatix::add_significance(p.col = &quot;p.adj&quot;) %&gt;%
  rstatix::add_xy_position(x = &quot;values&quot;, dodge = 0.8)
  p1 &lt;- ggplot(stack[1:170], aes(x = factor(phenotypes), y = values)) +
  geom_boxplot(aes(fill = modules)) +
  theme_prism()
  # remember colour and step.group.by are referring to a column name in df_p_val
  p1 + stat_pvalue_manual(stat1, label = &quot;p = {p.adj}&quot;)
  </code></pre>
  <p>It works fine for producing p1, but when I want to print the p value and show its significance, it give the same warning message:</p>
  <pre><code>Warning message:
  Removed 6 rows containing non-finite values (stat_bracket). 
  </code></pre>
  <p>The dataset is:</p>
  <pre><code>stack[1:170,]&lt;- structure(list(phenotypes = c(&quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, 
  &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Classical&quot;, 
  &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, 
  &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, 
  &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, 
  &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, 
  &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Neural&quot;, &quot;Proneural&quot;, 
  &quot;Neural&quot;, &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Classical&quot;, 
  &quot;Classical&quot;, &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, 
  &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, 
  &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, 
  &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Neural&quot;, 
  &quot;Neural&quot;, &quot;Classical&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, 
  &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Mesenchymal&quot;, 
  &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, &quot;Proneural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, 
  &quot;Mesenchymal&quot;, &quot;Neural&quot;, &quot;Classical&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, 
  &quot;Mesenchymal&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, 
  &quot;Classical&quot;, &quot;Neural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, &quot;Neural&quot;, &quot;Proneural&quot;, 
  &quot;Neural&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Mesenchymal&quot;, 
  &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, 
  &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Classical&quot;, 
  &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Neural&quot;, 
  &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, &quot;Classical&quot;, &quot;Classical&quot;, 
  &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, 
  &quot;Neural&quot;, &quot;Proneural&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, 
  &quot;Mesenchymal&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, &quot;Mesenchymal&quot;, &quot;Classical&quot;, 
  &quot;Proneural&quot;, &quot;Classical&quot;, &quot;Neural&quot;, &quot;Mesenchymal&quot;, &quot;Proneural&quot;, 
  &quot;Classical&quot;, &quot;Classical&quot;, &quot;Proneural&quot;, &quot;Proneural&quot;, &quot;Mesenchymal&quot;
  ), values = c(-0.126482404651362, 0.00859685106988051, -0.139119978025995, 
  -0.121760256216002, -0.114050357589663, -0.16158166178197, -0.169089521235389, 
  0.134388350128016, -0.128728040505512, 0.0933639502568886, -0.116285533417, 
  -0.0715164710720025, -0.050281653395796, -0.0712583935347317, 
  -0.116848802717176, -0.1394796603133, -0.131958454866075, -0.167862157710569, 
  0.0781961256653059, -0.0874083890994826, -0.142602528126273, 
  -0.132749359004561, 0.0530754944359762, -0.112556115187184, -0.126475329197849, 
  -0.103764754820242, -0.0377897554734426, -0.0825700087419535, 
  0.0565802594387166, -0.127113477946288, 0.0621406527851034, -0.0353373248499261, 
  0.0651104404770428, -0.046842885259204, -0.0388244031159389, 
  -0.0331569959442778, 0.033701438947606, 0.0642070914755685, -0.0753508936454846, 
  0.116575055033346, 0.0618127428574358, 0.0913128306164853, -0.131098598718593, 
  0.00663000043165442, 0.087646298412118, 0.0424501375261861, 0.132271826019638, 
  -0.116098261441119, 0.150578014972223, 0.0370869606412521, 0.124207975834675, 
  -0.0697137156198783, 0.045603425091438, 0.128723238203833, -0.00899840307387745, 
  0.0716898207350761, 0.0278474335783047, -0.00251548498551291, 
  0.00944990607573422, 0.063040030569466, -0.00966936428286957, 
  -0.103167359695479, -0.109970747377413, 0.092822101720664, 0.0599647788263245, 
  -0.0402260247392427, 0.0561493322564905, -0.0337741476357838, 
  0.0123028680258031, 0.0829652405103008, 0.0473861745713383, 0.0552591953919883, 
  0.0589190391293063, 0.0542800207749991, -0.0590957568660261, 
  -0.0768057537931389, -0.0631594939938725, 0.0232166721127454, 
  0.0794818086402467, 0.0163758735536393, 0.0364047314888439, -0.056987419443193, 
  0.0102418241805152, 0.0834466785300582, -0.0621321025318891, 
  -0.0202384484936535, 0.0472178852980202, 0.0500099068565177, 
  -0.000386746443747292, 0.0336169099739554, -0.0196318551702082, 
  0.0215504671153622, 0.0370043737532354, 0.00236114001435378, 
  0.0187774063941158, 0.0118748174856794, 0.0438428539755876, 0.0590938337833555, 
  -0.0214051371142639, 0.048970263838942, -0.0353986999749805, 
  -0.0652888103586655, 0.0307980036631203, 0.0435024586638615, 
  0.06349210003803, 0.0699162740441559, 0.0866779470756711, 0.0302570428387929, 
  0.039907529282083, 0.0413550598629916, 0.0194677506824577, 0.0382215014456658, 
  0.0998571537054834, 0.0249023251158023, 0.0491338848762949, 0.0739696647120266, 
  -0.0156915725176812, -0.086181923772576, 0.0484264963060224, 
  -0.0952872280628109, -0.0496917131983185, -0.0626613426906559, 
  -0.0235720315114444, 0.0402051758624549, 0.0541716193143272, 
  -0.0447085228859518, 0.0851145904041888, -0.0750319738540656, 
  -0.0395468309394087, -0.0171796695631005, 0.0143116629560395, 
  0.0139348413765643, -0.0605286733223814, -0.0680551202279635, 
  0.0935675698428226, -0.121323835109815, 0.0650088114184009, 0.0286512581822918, 
  -0.0267822397048852, 0.0560594126094381, -0.0866917309227976, 
  0.0761270963342822, 0.0102442673059245, 0.064812961280754, 0.0566119307303998, 
  0.0903385384522695, -0.0471706176728432, 0.00751391691722696, 
  0.0350567757887319, 0.0587473888278628, 0.0645068776643195, -0.0843968892218576, 
  0.0978188183251172, -0.0248768078605493, -0.101713696034819, 
  0.0535916907441913, 0.081542193680387, 0.107977971088651, 0.076239889269626, 
  0.0817493803790159, -0.00988348985129774, 0.119297845556547, 
  0.0769790743428255, -0.0632279011942837, -0.140594814112487, 
  0.0982145914982851, 0.129445220757845, -0.0740271756065673, -0.049940713932579, 
  -0.0076347504220374), modules = structure(c(1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L), .Label = c(&quot;MEdarkturquoise&quot;, &quot;MEtan&quot;, &quot;MEdarkgrey&quot;, 
  &quot;MEsalmon&quot;, &quot;MEviolet&quot;, &quot;MEdarkolivegreen&quot;, &quot;MEdarkred&quot;, &quot;MEskyblue&quot;, 
  &quot;MEskyblue3&quot;, &quot;MEsteelblue&quot;, &quot;MEmidnightblue&quot;, &quot;MEcyan&quot;, &quot;MEsienna3&quot;, 
  &quot;MEyellowgreen&quot;, &quot;MElightcyan&quot;, &quot;MEorange&quot;, &quot;MEblack&quot;, &quot;MEdarkmagenta&quot;, 
  &quot;MEdarkorange&quot;, &quot;MEwhite&quot;, &quot;MEblue&quot;, &quot;MEgrey60&quot;, &quot;MEdarkgreen&quot;, 
  &quot;MEred&quot;, &quot;MEgrey&quot;), class = &quot;factor&quot;)), row.names = c(NA, 170L
  ), class = &quot;data.frame&quot;)
  </code></pre>
  <p>Suggestions will be welcomed.
  I want to print the p values and the significance using the <em>,<strong>,</strong></em> notation.</p>