matrix multiplication of vectors

Thomas Lumley thomas@biostat.washington.edu
Fri, 22 May 1998 13:48:52 -0700 (PDT)


An incompatibility:
S-PLUS
> x<-1:3
>  x%*%x
     [,1] 
[1,]   14
>  x%*%t(x)
     [,1] [,2] [,3] 
[1,]    1    2    3
[2,]    2    4    6
[3,]    3    6    9

R
> x<-1:3
> x%*%x
     [,1]
[1,]   14
> x%*%t(x)
Error in x %*% t(x) : non-conformable arguments


Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._