I have an example dataframe with an ID and value column:
ID_short    Value
Boar            4
Pig             5
Duck            6
Dog             7
Cat             8
Horse           9
I have another dataframe which has a column with the same IDs but extended with more characters:
ID_Extended
Duck_p15
Dog32
PigGG
Horse_p12
Cat_Ok
Boar_Ko_1999_test
I want to add this ID_Extended column to the first dataframe and I want the extended IDs to still match up with the short IDs in the correct row. The IDs are class character.
Example of desired output:
ID  Value   ID_Extended
Boar    4   Boar_Ko_1999_test
Pig     5   PigGG
Duck    6   Duck_p15
Dog     7   Dog32
Cat     8   Cat_Ok
Horse   9   Horse_p12
 
     
    