Subset a matrix by dimension names in a vector R?

I think Tim Riffe's answer is the most direct. If the user were unsure whether the 'nodenames' vector were a subset of both the rownames() and the colnames() values, then this might be a bit safer.

You can subset matrices based by index numbers, by dimension names (via a character vector, such as your nodenames), by logical vectors, and possibly other things that are beyond me.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions