[R] Triangular matrix upper to down

m.marcinmichal m.marcinmichal at gmail.com
Mon Sep 26 21:50:19 CEST 2011


Hi,
suppose that we have a triangular upper matrix A

test <- matrix(ncol = 4, nrow = 4)
test[1, ] <-  c(NA,1,1,1)
test[2, ] <-  c(NA,NA,1,1)
test[3, ] <-  c(NA,NA,NA,1)
test[4, ] <-  c(NA,NA,NA,NA)

I know how quickly set diagonal value diag(test) <- 1. But how quickly set
down value i.e. matrix is symmetrical? Is there in r project any quickly
function? 

Thanks,

Best 

Marcin

--
View this message in context: http://r.789695.n4.nabble.com/Triangular-matrix-upper-to-down-tp3845107p3845107.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list