I have a dataframe with the following structure:
Team S13.14 S14.15 S15.16 S16.17
1 A 12.70 4.15 118.60 122.53
2 B 1.20 7.25 232.33 140.23
3 C 2.35 70.02 84.63 90.83
4 D 2.98 126.10 129.80 122.33
I would like to obtain a data.frame like the following:
Team Season Level
1 A S13.14 12.70
2 A S14.15 4.15
....
n C S13.14 2.35
....
k D S16.17 122.33
In words: I would like to transform current column names into factors. I can't figure out a way of doing it without too much typing. Any suggestion?