> xtemp
V1 V2 V3 V4 V5
1 5 5 4 4 3
2 5 5 4 4 4
3 3 4 2 3 2
4 5 5 2 2 4
5 1 4 5 2 4
6 2 3 5 2 3
7 3 3 2 2 4
8 4 4 2 2 2
9 1 4 4 2 2
10 2 4 4 3 5
11 2 2 2 1 2
12 1 3 1 1 2
> xx <- array(NA,c(6,5,2))
> for (ii in 1:12){
+ if (ii %% 2 == 0){
+ xx[ii/2,,2] <- xtemp[ii,]
+ }else{
+ xx[(ii+1)/2,,1] <- xtemp[ii,]
+ }}
Error in xx[ii/2, , 2] <- xtemp[ii, ] : 下标数目不对
>


雷达卡



京公网安备 11010802022788号







