title: How to remove rows where all the selected columns has NAs with dplyr
body: <p>I have the following data frame:</p>
  <pre><code>dat &lt;- tibble(
    nm = letters[c(1:5)] ,
    g1 = c(1, 1, 2, NA, 2),
    g2 = c(1, NA, 1, NA, 2),
    ga = c(1 :3, NA, 5)
  )
  </code></pre>
  <p>It looks like this:</p>
  <pre><code>&gt; dat
  # A tibble: 5 × 4
    nm       g1    g2    ga
    &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;
  1 a         1     1     1
  2 b         1    NA     2
  3 c         2     1     3
  4 d        NA    NA    NA
  5 e         2     2     5
  </code></pre>
  <p>What I want to do is to exclude row when all the column that starts with &quot;g&quot; are NAs.
  Resulting in  this:</p>
  <pre><code> nm       g1    g2    ga
   a         1     1     1
   b         1    NA     2
   c         2     1     3
   e         2     2     5
  </code></pre>
  <p>I tried this but failed:</p>
  <pre><code>dat %&gt;% 
    filter_at(vars(contains(&quot;g&quot;)), !all_vars(is.na(.)))  
  </code></pre>
  <p>That gives:</p>
  <p>Error in <code>inherits_any()</code>:</p>
  <pre><code>! Quosures can only be unquoted within a quasiquotation context.
  
  # Bad: list(!!myquosure)
  
  # Good: dplyr::mutate(data, !!myquosure)
  </code></pre>