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.
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.