title: R error "sum not meaningful for factors"
body: <p>I have a file called rRna_RDP_taxonomy_phylum with the following data : </p>
  
  <pre><code>364  "Firmicutes"            39.31
  244  "Proteobacteria"        26.35
  218  "Actinobacteria"        23.54
  65   "Bacteroidetes"         7.02
  22   "Fusobacteria"          2.38
  6    "Thermotogae"           0.65
  3     unclassified_Bacteria  0.32
  2    "Spirochaetes"          0.22
  1    "Tenericutes"           0.11
  1     Cyanobacteria          0.11
  </code></pre>
  
  <p>And I'm using this code for creating a pie chart in R: </p>
  
  <pre><code>if(file.exists("rRna_RDP_taxonomy_phylum")){
      family &lt;- read.table ("rRna_RDP_taxonomy_phylum", sep="\t")
      piedat &lt;- rbind(family[1:7, ],
                  as.data.frame(t(c(sum(family[8:nrow(family),1]),
                                  "Others",
                                  sum(family[8:nrow(family),3])))))
      png(file="../graph/RDP_phylum_low.png", width=600, height=550, res=75)
      pie(as.numeric(piedat$V3), labels=piedat$V3, clockwise=TRUE, col=graph_col, main="More representative Phyliums")
      legend("topright", legend=piedat$V2, cex=0.8, fill=graph_col)
      dev.off()
      png(file="../graph/RDP_phylm_high.png", width=1300, height=850, res=75)
      pie(as.numeric(piedat$V3), labels=piedat$V3, clockwise=TRUE, col=graph_col, main="More representative Phyliums")
      legend("topright", legend=piedat$V2, cex=0.8, fill=graph_col)
      dev.off()
  }
  </code></pre>
  
  <p>I've been using this code for different datafiles and it works fine, but with the file presented adobe it crash returning the following message: </p>
  
  <pre><code>Error in Summary.factor(c(6L, 2L, 1L), na.rm = FALSE) : 
    sum not meaningful for factors
  Calls: rbind -&gt; as.data.frame -&gt; t -&gt; Summary.factor
  Execution halted
  </code></pre>
  
  <p>I need to understand why it crash with this file and if there's any way to prevent this kind of errors. </p>
  
  <p>Thanks!</p>