I have a data.frame that looks like this:
#row.name #col1 #col2
MAP4K3 Centrosome
STK32A Centrosome Cytosol
ADCK2 Centrosome
what I'd like to achieve is a new row duplicating the name and adding at the first column the value of the second column:
#row.name #col1
MAP4K3 Centrosome
STK32A Centrosome
STK32A Cytosol
ADCK2 Centrosome
I'd like to loop this through the entire data.frame.
Thank you