0

I am trying to see if there is a way to make a table output what names are listed for what IDs. For example:

Column A: Name Column B: ID Column C: Random Data Column D: Random Data

There are multiple reoccuring IDs (lets say 12345) that has the names Jon, Bob, Allen, Matt, etc mapped to it. I want to know what IDs are linked to Jon then also find out what other names are linked to the same ID that is linked to Jon.

So I would like the output to be:

Column A: Jon (My key name) Column B: ID (All IDs linked to Jon) Column C: Other name linked to same ID as Jon Column D: Other name linked to same ID as Jon etc etc

Column X: Random Data Column y: Random Data

so:

Picture

  • 3
    Hi there and welcome to SO. Please make a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) or [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) with a sample input and your expected output. [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) Based on your input we can understand your problem and think about a possible solution and verify it compared to your expected output. – Martin Gal Apr 28 '22 at 20:55

0 Answers0