I have a list of SNP names of length 2139. 
I have been trying to match each one of these names one a time to this   character list of 23 rows, where each row contains multiple names so
that I can assign the locus name for each SNP.  
I have tried grep and match and nothing is working. This shows the first 10 elements of my character vector that has the SNP names:   
   [1] kgp32557    kgp37275    kgp38994    kgp45973    kgp53783      kgp61605    kgp73110    kgp74757   
And this shows the character list of 23 rows (truncated as well
because many names in each row so I show a list of names in row 1):
    [1,]   kgp9852430,rs1017860,rs7242868,kgp7009716,kgp6611434,kgp4808508,rs2850724,kgp3871878,kgp16151703,kgp16188651,rs9954562,kgp16153963,kgp7895020,....
 
    