[R] Get part of a GO term

2012-04-10 Thread stella
Hi, Sorry, I am bad with regular expression and a beginner with R. How do I get only the numbers 0009987 from the following entry? GO:0009987~cellular process Thanks a lot, Stella -- View this message in context: http://r.789695.n4.nabble.com/Get-part-of-a-GO-term-tp4546125p4546125.html Sent

Re: [R] Get part of a GO term

2012-04-10 Thread Martin Morgan
On 04/10/2012 09:11 AM, stella wrote: Hi, Sorry, I am bad with regular expression and a beginner with R. How do I get only the numbers 0009987 from the following entry? GO:0009987~cellular process sub(.*:(.*)~.*, \\1, GO:009987~cellular process) but you might also be interested in