I don't want to fill up the matrix with zero or something else. I am wondering how one can deal with these questions
data<- structure(c(79L, 106L, 156L, 194L, 248L, 248L, 248L, 266L, 272L,
79L, 106L, 125L, 156L, 156L, 156L, 156L, 156L, 194L, 79L, 156L,
156L, 156L, 156L, 156L, 156L, 156L, 156L, 79L, 248L, 393L, 674L,
2447L, NA, NA, NA, NA, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L,
21L, NA, NA, NA, NA, NA, NA, NA, NA, NA), .Dim = c(9L, 6L), .Dimnames = list(
NULL, c("a", "b", "c", "d",
"e", "f")))
1- highlight those that more than once repeated in one column
Expected output
a b c d e f
[1,]248(3) 156(3) 156(8) 21(9)
[2,] 248(2)
[3,]
[4,]
[5,]
[6,]
[7,]
[8,]
[9,]
1- highlight those that more than once repeated in row column
Expected output
[1,] 79(4)
[2,] 106(2)
[3,] 156(2)
[4,] 156(2)
[5,] 156(2)
[6,] 156(2)
[7,] 156(2)
[8,] 156(2)
[9,]
3- how to keep unique element in each column without changing the dimension ?
expected output
a b c d e f
[1,] 79 79 79 79 21
[2,] 106 106 156 248
[3,] 156 125 393
[4,] 194 156 674
[5,] 248 194 2447
[6,] 266
[7,] 272
[8,]
[9,]
4- how to find which numbers appears in the entire matrix based on row , ranking
expected output
21(9) 156(8) 248(3) 156(3) 248(2)