title: r - phyloseq - ordination of taxa other than species (family, order, etc.)
body: <p>I have reviewed the phyloseq tutorials, but I can't determine how to determine the stress level and plot the ordination of a specific taxa (other than species), such as family or other classifications.</p>
  
  <p>In order to illustrate my point, here is the following R code:</p>
  
  <pre><code>library("phyloseq")
  
  data(GlobalPatterns)
  
  GP &lt;- GlobalPatterns
  </code></pre>
  
  <p>This is an attempt to isolate the family taxa only</p>
  
  <pre><code>GPtaxa &lt;- tax_table(GP)[, "Family"]
  
  GPotu &lt;- otu_table(GP)
  
  GPsd &lt;- sample_data(GP)
  
  GPpt &lt;- phy_tree(GP)
  
  GPnew &lt;- phyloseq(GPotu, GPsd, GPtaxa, GPpt)
  </code></pre>
  
  <p>Using the default GlobalPatterns data set</p>
  
  <pre><code>GP1 &lt;- ordinate(GP, "NMDS", engine = "monoMDS", maxit = 200, try = 100)
  
  GP1$stress
  
  # [1] 0.1612348
  </code></pre>
  
  <p>Using the revised GlobalPatterns data set with family as the only taxa    </p>
  
  <pre><code>GP2 &lt;- ordinate(GPnew, "NMDS", engine = "monoMDS", maxit = 200, try = 100)
  
  GP2$stress
  
  # [1] 0.1612348
  </code></pre>
  
  <p>How do you perform ordination of a taxa other than species using phyloseq?</p>
  
  <p>I know how to do this in vegan, but I need a phyloseq solution.</p>
  
  <p>Thank you.</p>