text: user12549: I'm trying to generate boxplot from Beta diversity boxplot between two conditions from a phyloseq object.
  I have a Morisita-horn distance generated by vegdist fonction :
  vegdist<-vegdist(t(otu_table(physeq_genus_3a)), method="horn")#matrice distance Morisita-horn
  vegdist<-as.matrix(vegdist)
  
  Now I have a matrix and I would like to somewhat create a mean distance boxplot of the Morisita-horn index winthin two condition like the graph below.
  I wanted to do a simple boxplot with ggplot but beacause it is a matrix and not a dataframe, I can't do it.
  Any help or suggestions would be more than welcome.
  
  
  user3541: 
  You can use as.data.frame() or as_tibble() to convert/coerce your matrix to a data frame or a tibble respectively (Technically a tibble is also a data frame). From there you should be fine with ggplot().
  
  I would not use a "dynamite plot" (this is a box plot with error bars like the one in your question), that type of plots conceal the data! This post explains why and remedies.
  
  
  
original_text: 12549: <p>I'm trying to generate boxplot from Beta diversity boxplot between two conditions from a phyloseq object.</p>
  <p>I have a Morisita-horn distance generated by vegdist fonction :</p>
  <pre><code>vegdist&lt;-vegdist(t(otu_table(physeq_genus_3a)), method=&quot;horn&quot;)#matrice distance Morisita-horn
  vegdist&lt;-as.matrix(vegdist)
  </code></pre>
  <p>Now I have a matrix and I would like to somewhat create a mean distance boxplot of the Morisita-horn index winthin two condition like the graph below.</p>
  <p>I wanted to do a simple boxplot with ggplot but beacause it is a matrix and not a dataframe, I can't do it.</p>
  <p>Any help or suggestions would be more than welcome.</p>
  <p><a href="https://i.stack.imgur.com/8bUl6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8bUl6.jpg" alt="enter image description here" /></a></p>
   3541: <ol>
  <li><p>You can use <code>as.data.frame()</code> or <code>as_tibble()</code> to convert/coerce your matrix to a data frame or a tibble respectively (Technically a tibble is also a data frame). From there you should be fine with <code>ggplot()</code>.</p>
  </li>
  <li><p>I would not use a &quot;dynamite plot&quot; (this is a box plot with error bars like the one in your question), that type of plots conceal the data! <a href="https://simplystatistics.org/2019/02/21/dynamite-plots-must-die/" rel="nofollow noreferrer">This post</a> explains why and remedies.</p>
  </li>
  </ol>
  