Generate square symmetric matrix in R
I have a matrix in R as follows: dat <- matrix(c(2,3,5,7,8,4), ncol = 6) colnames(dat) <- c("A(1,1)", "A(1,2)", "A(1,3)", "A(2,2)", "A(2,3)", "A(3,3)") How can I create a square symmetric matrix based on an apply function that has the following form: A(1,1) A(1,2) A(1,3) A(2,1) A(2,2) A(2,3) A(3,1) A(3,2) A(3,3) Note that A(1,2)=A(2,1) >Solution : This… Read More Generate square symmetric matrix in R