Re: [R] multiply two matrixes with the different dimension column by column

From: Alberto Monteiro <albmont_at_centroin.com.br>
Date: Fri 13 Oct 2006 - 12:36:01 GMT

Majid Iravani wrote:

>

> I would like to multiply two matrixes with the different dimension
> column by column. Let make an example: If I have two matrixes "X"
> and "Y"as follow:
>
> X<- matrix(1:12, nrow=4, ncol=3, dimnames=list(c("A","B","C","D"),
> c("stage1","stage2","stage3")))
> Y<- matrix(1:28, nrow=4, ncol=7, dimnames=list(c("A","B","C","D"),
> c("site1","site2","site3","site4","site5", "site6","site7")))
>
t(X) %*% Y will give something; I don't know if this is what you want.

Alberto Monteiro



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat Oct 14 14:33:33 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 14 Oct 2006 - 05:30:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.