title: Remove NA values with tidyverse mutate
body: <p>My dataframe contains entries 'n/a' that cannot be detected by na.omit(). I am aware that the mutate function in the tidyverse package is able to transform the 'n/a' entries into proper null values and to be dropped. Here is what I have attempted but an error occurs: Error in replace(value, value == &quot;n/a&quot;, NA) : object 'value' not found. Thanks in advance!</p>
  <pre><code>&gt; head(data)
    customer_id gender past_3_years_bike_related_purchases   DOB
  1           1      F                                  93 19644
  2           2   Male                                  81 29571
  3           5 Female                                  56 28258
  4           8   Male                                  31 22735
  5           9 Female                                  97 26733
  6          12   Male                                  58 34536
    job_industry_category    wealth_segment owns_car tenure           state
  1                Health     Mass Customer      Yes     11 New South Wales
  2    Financial Services     Mass Customer      Yes     16 New South Wales
  3                   n/a Affluent Customer      Yes      8 New South Wales
  4                   n/a     Mass Customer       No      7 New South Wales
  5           Argiculture Affluent Customer      Yes      8 New South Wales
  6         Manufacturing     Mass Customer       No      8             QLD
  
  data %&gt;% 
    mutate(value = replace(value, value == &quot;n/a&quot;, NA)) %&gt;% 
    drop_na()
  </code></pre>