title: Remove columns from data frame that only contain zeros
body: <p>I'm trying to recreate a data frame (DC5_prod) that has hundreds of columns, but many without any values other than zero.</p>
  
  <p>The first column in the data frame is text and the rest are numeric.  Is there a way to ignore the first column while simultaneously eliminating the remainder of columns that are composed entirely of zeros?</p>
  
  <pre><code>DC5_Prod
   a   b c d e f   
  1 AK 0 0 0 0 1 
  2 JI 0 0 0 0 0 
  </code></pre>
  
  <p>The above is a snippet of how it currently stands and would want an output of:</p>
  
  <pre><code>DC5_Prod
   a    f   
  1 AK  1 
  2 JI  0 
  </code></pre>
  
  <p>When I attempt to utilize the solution issued on a similar question on the site:</p>
  
  <pre><code>DC5_prod[, colSums(DC5_prod != 0) &gt; 0]
  </code></pre>
  
  <p>just essentially returns the first column without removing any. </p>