I have a data frame for the A matrix that looks like this:
V1 V2 V3
1 1 1 1
2 2 1 0
3 2 2 1
4 3 1 0
5 3 2 0
6 3 3 1
and I also have a cross reference data frame that has the original ID and the new ID that looks like this:
ID newID
1 SE1 1
2 T3 2
3 R5 3
4 R7 4
5 R9 5
6 A11 6
how can I use to obtain a data frame like this (after creating the new columns ID1 and ID2)?
V1 V2 V3 ID1 ID2
1 1 1 1 SE1 SE1
2 2 1 0 T3 SE1
3 2 2 1 T3 T3
4 3 1 0 R5 SE1
5 3 2 0 R5 T3
6 3 3 1 R5 R5