Remove part of string in R
You may use gsub function

&gt; c &lt;-  "ce7382"
&gt; gsub("[a-zA-Z ]", "", c)
[1] "7382"


Feel free to add other characters you need to remove to the regexp and / or to cast the result to number with as.numeric.