If I have the following data.table
matchID characterID info 1111 4 abc 1111 12 def 1111 1 ghi 2222 8 jkl 2222 7 mno 2222 3 pwr 3333 9 abc 3333 2 ghi 33333 4 jkl
I want to subset it to look for specific characterIDs, but return every matchID associated with the characterID. For instance, if I query for characterID = 12 I should get this data set:
matchID characterID info 1111 4 abc 1111 12 def 1111 1 ghi
What would that data.table subset look like? I am specifically looking for something in the form of datatable[characterID = 12, 1:3, Info].