作者bcs (= ="frailty..gggg XD)
看板D95323XXX
標題[計量] R的element wise multiplication?
時間Wed Jun 20 23:23:22 2007
經過剛好看到板上有討論R
想請問在R中element wise的相乘符號是?
在Gauss,Ox都能跑,但在R好像不能支援non-conformable
OX :
#include<oxstd.h>
main(){
decl a, b, c;
a=<2,1>;
b=<2,1;3,4;4,6>;
c=a.*b;
print(a,b,c);
}
R: warnning!
a<-matrix(c(2,1),1,2)
b<-matrix(c(2,1,3,4,4,6),3,2)
c<-a*b
a*b : non-conformable arrays
試了outer / inner product 都失敗。
麻煩各位,謝謝:>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.247.214