Skip to content
Prev 267873 / 398502 Next

row*matrix

On Aug 6, 2011, at 4:35 PM, smajor wrote:

            
Vector are not column or row vectors by default. They don't actually  
have a dim attribute unless you force one on them. Also you are using  
a scalar operator and need to use "%*%" to do matrix  
multiplication ....  so:

 > dim(v2) <-c(1,3)
 > v2%*%M
      [,1] [,2] [,3]
[1,]    4    5    6

As expected. So now you should go back to your introductory material  
as well as help("%*%") and help("*").