title: how to convert a column to numeric while it contains both strings and numbers as strings
body: <p>I have a data frame in which there is column that I want to use to join with another data frame. The column contains number as string and strings such as follows:</p>
  
  <pre><code>x&lt;-data.frame(referenceNumber=c("80937828","gdy","12267133","72679267","72479267"))
  </code></pre>
  
  <p>How Can I convert the numbers as string to numeric and replace the strings with zeros/null?</p>
  
  <p>I tried <code>x %&gt;% mutate_if(is.character,as.numeric)</code></p>
  
  <p>But it returns the following error :</p>
  
  <blockquote>
  <pre><code>"Error in UseMethod("tbl_vars") : 
    no applicable method for 'tbl_vars' applied to an object of class "character""
  </code></pre>
  </blockquote>