Dear all,
I am trying to extract a specific value corresponding to a criterium from a group of matrices, and paste all the values obtained in a single vector.
In the example below I created a matrix where the headings have 3 numbers and the others are values to be possibly extracted.
I called the matrix "M1" and I have similar matrices "M2" to "M10".
The other matrices (M2 - M10) may not have exactly all the same rows and columns, for example M2 may be of the form:
For each matrix, I would like to extract the value corresponding to the headings -say- column:112, row:131 and paste it in a vector which has 10 entries (for each matrix from M1 to M10),
or paste a missing value in the vector when the entry is not available in the matrix.
Thanks in advance for the help!
Sincerely
Luca
I am trying to extract a specific value corresponding to a criterium from a group of matrices, and paste all the values obtained in a single vector.
In the example below I created a matrix where the headings have 3 numbers and the others are values to be possibly extracted.
I called the matrix "M1" and I have similar matrices "M2" to "M10".
111 | 112 | 121 | |
111 | 1 | 7 | 8 |
121 | 6 | 3 | 12 |
131 | 2 | 8 | 3 |
133 | 1 | 7 | 43 |
111 | 112 | |
111 | 10 | 4 |
131 | 3 | 5 |
222 | 3 | 7 |
or paste a missing value in the vector when the entry is not available in the matrix.
Thanks in advance for the help!
Sincerely
Luca
Comment