I have an table with 8 variables and i want to merge 2 columns named Sample and NorTum and both columns Sample and NorTum should stay in the table. Someone an idea how to do this with R or SQL? The data looks as follows:
Sample Sample_Code Sample_Group NorTum Sentrix_ID Sentrix_Position Pool_ID Folderdate
1 00_11242 00_11242T1 MUTYH T1 1403371 R007_C006 GS0005703-OPA Exp051118
2 00_11242 00_11242T1 MUTYH T1 1403371 R007_C012 GS0005704-OPA Exp051118
3 00_11242 00_11242T1 MUTYH T1 1416198 R007_C006 GS0005701-OPA Exp051118
4 00_11242 00_11242T1 MUTYH T1 1416198 R007_C012 GS0005702-OPA Exp051118
5 00_11242 00_11242T1 MUTYH T1 1280307 R007_C006 GS0005703-OPA Exp051116
6 00_11242 00_11242T1 MUTYH T1 1280307 R007_C012 GS0005704-OPA Exp051116
7 00_11242 00_24200N2 MUTYH N 1403371 R007_C005 GS0005703-OPA Exp051118
8 00_11242 00_24200N2 MUTYH N 1403371 R007_C011 GS0005704-OPA Exp051118
I`m sorry for the bad format of the table. But the idea for example is: Sample: 00_11242 and Nortum: T1 merge to Sample_ID so that the output looks like: Sample_ID:00_11242_T1
Thanks in advance!
Assuming your dataframe is called dat