Reputation: 866
I have combined different matrix with same row size using cbind()
. I observe that the column name of resulting matrix is not accessible using $
.
Is there any specific reason for this? Thanks.
Upvotes: 0
Views: 948
Reputation: 694
The $
operator does not work for matrices. Instead use matrix_name[,'column_name']
or matrix_name[,i]
, being i
the column index.
Upvotes: 2