Dyadkey

I wrote this little program to create a symmetric id for a dyad so that it will have the same value regardless of who is ego and who is alter. I wrote it because one of my grad students was having trouble with a dataset on mergers in that it was hard to get the computer to understand that “exxon_mobil” is the same thing as “mobil_exxon”. The solution is to just get it so that the two components always combine in alphabetical order (or any other order, it doesn’t matter, as long as it’s consistent). If you’re using numeric key variables you might want to “string()” them before running it.