Unable to convert type character to numeric in R
<p>The columns in my data frame are stored as characters. I get an error when i use the aggregate function because of using the operation on characters. I could find a similar question but the solution provided i.e as.numeric(as.character(dataframe)) does not work for me. How do I change the type of my column and also retain the column's value?</p>

<pre><code>&gt; str(df$Order_Quantity)
  chr [1:92] "1,909.60" "2,019.20" "4,119.60" "-" "11,000.00" "1110.00"  "80.5" ...
&gt; df$Order_Quantity&lt;- as.numeric(as.character(df$Order_Quantity))
 Warning message:
 NAs introduced by coercion 
&gt; str(df$Order_Quantity)
 num [1:92] NA NA NA NA NA NA 10.5 NA NA 26 ...
#I am losing my data 
</code></pre>