Skip to content
Prev 140656 / 398506 Next

Alignment and Reshaping of the matrix

Is this what you are after:
+ 88 .98 90 .78 88 .76 89 .56
+ 90 .67 95 .67 89 .89 90 .87
+ 91 .56 96 .87 90 .76 92 .98"))
+     x.m[x[, i], (i + 1) / 2] <-x[, i + 1]  # save values
+ }
[,1] [,2] [,3] [,4] [,5]
 [1,]   85 0.90 0.00 0.00 0.00
 [2,]   86 0.00 0.89 0.00 0.87
 [3,]   87 0.00 0.00 0.98 0.00
 [4,]   88 0.98 0.00 0.76 0.00
 [5,]   89 0.00 0.00 0.89 0.56
 [6,]   90 0.67 0.78 0.76 0.87
 [7,]   91 0.56 0.00 0.00 0.00
 [8,]   92 0.00 0.00 0.00 0.98
 [9,]   93 0.00 0.00 0.00 0.00
[10,]   94 0.00 0.00 0.00 0.00
[11,]   95 0.00 0.67 0.00 0.00
[12,]   96 0.00 0.87 0.00 0.00
On Sat, Mar 29, 2008 at 7:21 PM, dinesh kumar <barupal at gmail.com> wrote: