为了画出形象图,对数据进行如下转换,(原数据如下:resp表示三个时间点的呼吸状况,pulse表示三个时点的脉搏,drug1和drug2
| drug | resp1 | resp2 | resp3 | pulse1 | pulse2 | pulse3 |
1.0 3.4 3.3 3.3 2.2 2.1 2.1
1.0 3.4 3.4 3.3 2.2 2.1 2.2
1.0 3.3 3.4 3.4 2.3 2.4 2.3
1.0 3.4 3.4 3.4 2.3 2.4 2.3
1.0 3.3 3.4 3.3 2.2 2.2 2.4
1.0 3.3 3.3 3.3 2.0 2.1 2.4
2.0 3.3 3.3 3.3 2.8 2.9 2.7
2.0 3.2 3.3 3.4 2.6 2.7 2.7
2.0 3.2 3.2 3.2 2.7 2.9 2.7
2.0 3.2 3.2 3.2 2.6 2.8 2.9
2.0 3.2 3.3 3.3 2.7 2.8 2.9
2.0 3.3 3.2 3.1 2.6 2.8 2.8)把测量值反映到一个变量measure中,新加一个变量time区分各个时点的测量值,这样数据变为
drug time mesure
1 1 3.4
1 2 3.3
1 3 3.3
1 1 3.4
1 2 3.4
1. 3 3.3
.
.
.
求详细过程
原始数据见附件