[R] creating matrix row by row

Ragia Ibrahim ragia11 at hotmail.com
Sat Mar 28 11:42:59 CET 2015


 



Hi,
 I have a original adjacency  matrix  n X n , and I want to connect certain row with
 a set of other selected columns (could be not the same as in the 
original matrix).
this in each iteration I have a new row of this connections matrix , how to create this matrix.
having original row number and the numbers of columns that will be connected to.

e.g. 
   1 2 3 4 5
1  1 1 1 1 1
2  1 1 0 0 1
3
4
4

inf first iteration row 1 will have only connections to columns 2 and 5
and in secondly  row 2 will have only relation to column 2

how can I do this
thanks in advance

 		 	   		   		 	   		  
	[[alternative HTML version deleted]]



More information about the R-help mailing list