title: Converting existing data in R into Phyloseq OTU table
body: <p>I have been attempting to "phyloseq-ize" my asv_table, asv_id, and metadata for a 16S analysis, created using qiime2 and uploaded to R using <code>read.table()</code>.  I have been able to successfully import my asv_id and metadata (using <code>tax_table()</code> and <code>sample_data()</code> respectively), but I'm struggling with my asv_table.  </p>
  
  <p>The structure of my asv_table is a data frame containing a header of my taxa, and my rows are samples (I have also attempted this with transposed data where my taxa are rows and my samples are columns). My initial attempt was simply:</p>
  
  <pre><code>ps &lt;- phyloseq(otu_table(asv_table, taxa_are_rows = FALSE))
  </code></pre>
  
  <p>yet this yielded:</p>
  
  <pre><code>Error in validObject(.Object) : invalid class “otu_table” object: 
   Non-numeric matrix provided as OTU table.
  Abundance is expected to be numeric.
  </code></pre>
  
  <p>This led me to attempt to change the class of my data to numeric, and try importing again:</p>
  
  <pre><code>asv_table_num &lt;- data.matrix(asv_table, rownames.force = NA)
  
  ps &lt;- phyloseq(otu_table(otumat_num, taxa_are_rows = FALSE))
  
  Error in validObject(.Object) : invalid class “phyloseq” object: 
   Component taxa/OTU names do not match.
   Taxa indices are critical to analysis.
   Try taxa_names()
  </code></pre>
  
  <p>I'm worried this is heading down a rabbit hole as a simpler solution stares me in the face (I'm having a hard time researching my issue on the internet... usually indicative of me creating a unique issue no one else has encountered). </p>
  
  <p>I would appreciate any guidance or help on the topic!</p>
  
  <p>Thank you in advance.</p>