作者swedrf0112 (M)
看板Statistics
標題Re: [程式] R 如何找出行向量在矩陣中的行數
時間Wed Jul 2 13:29:22 2014
來個初學者的寫法
temp={0}
for ( i in 1:nrow(setX) )
{
temp[i]=sum(x=setX[i,])
}
which( temp==ncol(setX) )
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 163.15.152.186
※ 文章網址: http://webptt.com/m.aspx?n=bbs/Statistics/M.1404278964.A.CBE.html
1F:→ innocent817:謝謝回應:) 07/02 21:48