Remove part of string in R I have a table in R. It just has two columns and many rows. Each element is a string that contains some characters and some numbers. I need number part of the element. How can I have number part?
For example:

    INTERACTOR_A INTERACTOR_B
1          ce7380       ce6058
2          ce7380      ce13812
3          ce7382       ce7382
4          ce7382       ce5255
5          ce7382       ce1103
6          ce7388        ce523
7          ce7388       ce8534


Thanks
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.