[R] How to inset a cell into a matrix?

xushaw xushaw at hotmail.com
Mon Feb 20 13:16:13 CET 2012


hi
i'm facing a problem
How to inset a cell into a matrix?
for example i have a matrix:
 
332       244       332        244 
665       332       665        332
785       785       785        665

i want to covert the matrix like this:

0            244        0            244
332       332        332        332
665        0            665        665
785        785       785         0           

i find the minimum value from the 1st row, if any value greater than that, i
will inset a 0 in that column and move the whole column down.
but how to inset a cell?



--
View this message in context: http://r.789695.n4.nabble.com/How-to-inset-a-cell-into-a-matrix-tp4403887p4403887.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list