看板 Statistics 關於我們 聯絡資訊
在程式中,有兩筆dataA與dataB 如果希望將兩筆data比對符合的data另行收錄到另外一個matrix中 該如何下指令呢? ex: for(i in 1:1000) { if(match(A[i,],B[1,])>0) {指令? } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.121.97 ※ 編輯: greenlive 來自: 140.112.121.97 (12/03 17:13)
bugle:你要怎麼收錄? 長度不一是沒有辦法放到一個matrix的(NA?) 12/03 18:52
h0h1:library(sqldf); identical(x,y) 12/03 20:36
bugle:原PO用了match,所以應該不是identical 12/03 21:01