title: Created a new column using mutate, result is a column full of NAs (but this code worked for a different file I have)
body: <p>I am using tidyr and creating a new column using mutate to sum how many 0's were returned in a different column I have. For some reason, although the new column forms, I am receiving NA's throughout the column even when I can see there should be an answer of at least one (e.g. I see a 0 in a column, but the "count" (total) column still reads N/A".</p>
  
  <p>This code worked previously on a nearly identical dataset for the same type of question, can someone explain to me what is going on? A copy of my code is below. </p>
  
  <pre><code>Gathered &lt;- ScottCrkMeta250918 %&gt;% 
                  gather(SNP, Genotype, 43:234)
  
  Prefailed &lt;- Gathered %&gt;% 
                  group_by(NMFS_DNA_ID, BOX_ID,BOX_POSITION) %&gt;% 
                  mutate(Count = sum(Genotype == 0)) 
  </code></pre>
  
  <p>I am trying to see how many SNPs failed, therefore I have 0s in columns where there was a failure. I am trying to tell R to tally up these zeroes (failures) and give them to me in a separate column. </p>