I would very much appreciate if a kind soul could tell me how to do this in R:
Given a squared matrix with duplicated columns and rows, such as
1
You could use ?make.unique or ?make.names:
?make.unique
?make.names
v <- as.character(c(1, 1, 2, 2, 2, 2, 3)) make.unique(v) # [1] "1" "1.1" "2" "2.1" "2.2" "2.3" "3"
(You have to combine this with rownames and colnames.)
rownames
colnames