Here's the problem I'm trying to solve:
I have two different character columns. Both columns do come from different datasets and describe exactly the same objects, but with some slight differences and ordered in a different way. Here's a very little sample of each one.
A B
IFK Kristianstad Chekhov
HC Vardar Barça
Rhein-Neckar Löwen Vardar
FC Barcelona Rhein-Neckar Löwen
Chekhovski Medvedi PSG
Paris Saint-Germain Kristianstad
My goal is to match each value from column A with its correspondant in column B and get them together into a single dataframe, so my desired output will look like this:
A B
IFK Kristianstad Kristianstad
HC Vardar Vardar
Rhein-Neckar Löwen Rhein-Neckar Löwen
FC Barcelona Barça
Chekhovski Medvedi Chekhov
Paris Saint-Germain PSG
Moreover, as you can see even if in almost all cases, smaller or bigger, there is at least a match between each value on A with its correspondant in B, in one case (Paris Saint-Germain / PSG) they are linked because one is the acronym of the other. I have no idea about if there is a simple way to deal with it without having to rename anyone of the two values involved.
When it comes to the rest, until now I've tried unsuccessfully with functions such as match() or str_match().