I need to make a matrix from the Baseball dataset ( contains the ID of players who played on a certain team in a certain year). New matrix should indicate how many players played on several teams.
For example, teams ATL and BAL and we write in this box all the players who played on both the first and second teams. In this way we get a symmetric matrix.
Thanks a lot for your help