R - indirectly calling a matrix using a string
- by Boris Senderovich
Example:
There is a matrix of data called VE
There is a vector of string where the first element is the string VE.
I need to indirectly call the string and be able to access data.
For example if I need the 6th column of matrix VE then I want to do:
Vector[1][,6]
Essentially I need R to start reading those string as if they are the matrix names that are already in this page. I need this syntax to be dynamic because I am putting it in a loop.