title: Using as.numeric, with functions and pipes in R
body: <p>I have a function that looks like this</p>
  
  <pre><code> calc_df &lt;- function(A_df, B_df){
       C_df &lt;- filter(A_df, Type == "Animal") %&gt;% 
           left_join(B_df)  %&gt;%
           as.numeric(C$Count)
  </code></pre>
  
  <p>Where I cannot get the last lime to work, the first 3 work properly, but I would like the last line to take the column "Count" from the new df calculated in the function and make it numeric. (Right now it is a character vector)</p>
  
  <p>** I have to do this at the end of the function because before the filter command, the Count column contains letters and cannot be made as.numeric</p>