我有一个看起来像的数据框
ML1 ML1 SD ML2 ML2 SD ...
aPhysics0 0.8730469 0.3329205 0.5950521 0.4908820
aPhysics1 0.8471074 0.3598839 0.6473829 0.4777848
aPhysics2 0.8593750 0.3476343 0.7031250 0.4568810
aPhysics3 0.8875000 0.3159806 0.7000000 0.4582576
aPhysics4 0.7962963 0.4027512 0.7654321 0.4237285
...
我想使用行名来创建一个看起来像的数据框
Institution Subject Class ML1 ML1 SD ML2 ML2 SD ...
[1,] A Physics 0 0.8730469 0.3329205 0.5950521 0.4908820
[2,] A Physics 1 0.8471074 0.3598839 0.6473829 0.4777848
[3,] A Physics 2 0.8593750 0.3476343 0.7031250 0.4568810
[4,] A Physics 3 0.8875000 0.3159806 0.7000000 0.4582576
[5,] A Physics 4 0.7962963 0.4027512 0.7654321 0.4237285
...
最好的方法是什么?