rk, See
?sub ?regexp Then try sub( "-", "-dash-", "a-b" ) sub( "-.*", "", "a-b" ) Chuck On Sat, 18 Aug 2007, ramakanth reddy wrote: > I have two large arrays of strings array1 with 180000 names and array2 with > 24000 names ,I want to find the common names in both of them. > > My arrays are for example > > Array1 Array2 > > GAP4 > HIST1B-histamine.... > > MFG12 SNRPD-signal induced... > > CFH1A RNF-ribose nucleic... > > My > array 2 ,has description of the abbreviation ,how can I remove the > description part before using intersect command to match common names > in array1 and array2. > the description and abbreviation are separated by a hyphen --. > > I tried using matlab ,but due to the large file size it didnot work. > Can you suggest me something to overcome this problem. > > Thank You > rk > > > > > 5, 50, 500, 5000 - Store N number of mails in your inbox. Go to > http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:[EMAIL PROTECTED] UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.