create matrix with rows and columns according to variables length?
This post has NOT been accepted by the mailing list yet.
I need to create a loop. The issue is i have 2 variables, X and Y. And both are strings.
So, how do i create a matrix with the form
J(lengthX, lengthY, .)
Besides, i need that the names of the rows and columns be according to the strings from X and Y.
Using and example.
The labels of X are 01 05 06 07 08 09 and Y are 01 02 03 04 05 06 08.
So, i would need to create a matrix with 6 rows and 7 columns, naming the rows
01, 05, 06, 07, 08, 09 and the columns 01,02,03,04,05,06,08.
I know how to filled that matrix, but i have no idea declaring the number of rows or columns for the matrix. Also with the names of each one.
Using the option destring doesn't suite me because i have labels as 011 and others as 11 which are completely different.
Thanks for your time and interest.