Let Names a vector of chatacters. For example,
> Names [1] "g 604 be-0 -p1 (602 matches)" "g 606 Phli-0 -p2 (517 matches)" [3] "g 608 alu-0 (659 matches)"
I try to use gsub or grep functions for two problems :
1. First, I would like to delete all the characters between parentheses. [1] "g 604 be-0 -p1" "g 606 be-0 -p2" [3] "g 608 be-0 -p3"
2. And, I would like to extract the characters between parentheses [1] "602 matches" "517 matches" [3] "659 matches"
Any idea?
Best regards, Olivier
--
------------------------------------------------------------- Martin Olivier INRA - Unité protéomique LIRMM - IFA/MAB 2, Place Viala 161, rue Ada 34060 Montpellier Cédex 1 34392 Montpellier Cédex 5
Tel : 04 99 61 27 01 Tel : O4 67 41 86 71 [EMAIL PROTECTED] [EMAIL PROTECTED]
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help