[R] How to define new matrix based on an elementary row oper
Cuckovic Paik
cuckovic.paik at gmail.com
Sat Aug 28 17:32:57 CEST 2010
Thank you very much, David;
for row swapping: R2<==>R3
> A=diag(1:4)
> A
[,1] [,2] [,3] [,4]
[1,] 1 0 0 0
[2,] 0 2 0 0
[3,] 0 0 3 0
[4,] 0 0 0 4
> A1=A[c(1,3,2,4),]
> A1
[,1] [,2] [,3] [,4]
[1,] 1 0 0 0
[2,] 0 0 3 0
[3,] 0 2 0 0
[4,] 0 0 0 4
>
--
View this message in context: http://r.789695.n4.nabble.com/How-to-define-new-matrix-based-on-an-elementary-row-operation-in-a-single-step-tp2341768p2364398.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list