Displaying 1 result from an estimated 1 matches for "desired_output".
2009 Jan 11
3
Converting Numerical Matrix to List of Strings
Hi all,
Given a matrix:
> mat
[,1] [,2] [,3]
[1,] 0 0 0
[2,] 3 3 3
[3,] 1 1 1
[4,] 2 1 1
How can I convert it to a list of strings:
> desired_output
[1] "aaa" "ttt" "ccc" "gcc"
In principle:
1. Number of Column in matrix = length of string (= 3)
2. Number of Row in matrix = length of vector ( = 4).
3. Character "a" encode as "0",
"c" -> "1",
"g"...