table(matrix_obj)
Publié : sam. mars 23, 2019 2:41 am
Hello,
What is the procedure to create a table, from a matrix, where the first column vector is the positioning value
strList = ["one", "two", "three"]
numberList = [1, 2, 3]
array_strNum = zip( strList, numberList ) [enter] returns
[["one",1],
["two",2],
["three",3]]
table1 = table(array_strNum) [enter] returns
table(
(0,0)="one",
(0,1)=1,
(1,0)="two",
(1,1=2)... # ok, but
table2=table("one"=1,"two"=2,"three"=3) # this is what is desired
to then obtain the original matrix
unzip(table2) >
[["one",1],
["two",2],
["three",3]]
What is the procedure to create a table, from a matrix, where the first column vector is the positioning value
strList = ["one", "two", "three"]
numberList = [1, 2, 3]
array_strNum = zip( strList, numberList ) [enter] returns
[["one",1],
["two",2],
["three",3]]
table1 = table(array_strNum) [enter] returns
table(
(0,0)="one",
(0,1)=1,
(1,0)="two",
(1,1=2)... # ok, but
table2=table("one"=1,"two"=2,"three"=3) # this is what is desired
to then obtain the original matrix
unzip(table2) >
[["one",1],
["two",2],
["three",3]]