0

I have two data frames as

> df1
      A            B
1MG               70
ABOF              52  
Amazon            12
American Swan     10
Clovia            12


> df2

      A                            B                                         
1 MG Solution
ABOF Prime
Dual Command
Amazon AWF
American Swan Financial Services 
Clovia World Spaces
Shape Makers 
Unions

I want to return values for partially matched characters from df1 to df2. For example , Amazon has value 12 in df1 and in df2 i want this value to be returned in front of every string that has Amazon in it. If not found return NA.

result_df is the expected output i am expecting .

> reslut_df

      A                             B                      
1 MG Solution                       70
ABOF Prime                          52
Dual Command                        NA
Amazon AWF                          12
American Swan Financial Services    10
Clovia World Spaces                 12 
Shape Makers                        NA
Unions                              NA
Martin Schmelzer
  • 23,283
  • 6
  • 73
  • 98
  • 3
    Have a look [here](http://stackoverflow.com/questions/21165256/r-merge-data-frames-allow-inexact-id-matching-e-g-with-additional-characters). – Tim Biegeleisen Jun 27 '16 at 07:53
  • Is there any simpler way than this : http://stackoverflow.com/questions/21165256/r-merge-data-frames-allow-inexact-id-matching-e-g-with-additional-characters –  Jun 27 '16 at 09:06
  • The link you quoted looks fairly close to your problem. Try it, it is easier than you might think. – Tim Biegeleisen Jun 27 '16 at 09:11

0 Answers0