I have a table where I need to choose all the values in the Data column, match with the column names and take the value from that row. Ex. Data column: choose A1, find column name with same name (A1 )and take the value (1), choose A3, find column name with same name (A3) and take the value (11) and then print it to a table.
Can somebody help me, I am new using R and I do not know where to start.
A1 A2 A3 Data
1 5 9 A1
2 6 10 A2
3 7 11 A3
4 8 12 A4