title: How to Use na.rm=TRUE with n() While Using Dplyr's Group_by and Summarise_at
body: <pre><code>library(tidyverse) 
  </code></pre>
  
  <p>I'm stuck on something that should be so simple! Using the code below, all I want to do is group and summarise the three "Var" columns. I want counts and sums (so that I can create three percentage columns, so bonus if you can include an easy way to accomplish this in your answer). However, I don't want to include the NA's. Removing the NA's from sum is easy enough by using "na.rm=TRUE", but I can't seem to figure out how to not include the NA's in the counts (using n() ) while using dplyr::summarise_at. </p>
  
  <p>Am I missing something very simple? </p>
  
  <pre><code>Df%&gt;%group_by(Group)%&gt;%summarise_at(vars(Var1:Var3),funs(n(),sum((.),na.rm=TRUE)))
  
  Group&lt;-c("House","Condo","House","House","House","House","House","Condo")
  Var1&lt;-c(0,1,1,NA,1,1,1,0)    
  Var2&lt;-c(1,1,1,1,0,1,1,1)
  Var3&lt;-c(1,1,1,NA,NA,1,1,0)
  
  Df&lt;-data.frame(Group,Var1,Var2,Var3)
  </code></pre>