두 개 데이터 프레임 병합, 빼기
하나이상의 key를 가지고 두 개의 데이터 프레임을 join하는 연산 두 개의 데이터로 병합 small big Solution두 개 데이터 프레임 병합, 빼기
공통 키를 기준으로 병합
# merge two data frames by ID
total <- merge(data frameA,data frameB,by="ID")
# merge two data frames by ID and Country
total <- merge(data frameA,data frameB,by=c("ID","Country"))
빼기
Larger - Smaller
ID CSF1PO CSF1PO.1 D10S1248 D10S1248.1 D12S391 D12S391.1
203079_BA_M 10 11 14 16 -9 -9
203079_BA_F 8 12 14 17 -9 -9
203080_BA_M 10 12 13 13 -9 -9
ID CSF1PO CSF1PO.1 D10S1248 D10S1248.1 D12S391 D12S391.1
203078_MG_M -9 -9 15 15 18 20
203078_MG_F -9 -9 14 15 17 19
203079_BA_M 10 11 14 16 -9 -9
203079_BA_F 8 12 14 17 -9 -9
203080_BA_M 10 12 13 13 -9 -9
203080_BA_F 10 11 14 16 -9 -9
203081_MG_M 10 12 14 16 -9 -9
203081_MG_F 11 12 15 16 -9 -9
203082_MG_M 11 11 13 15 -9 -9
203082_MG_F 11 11 13 14 -9 -9
BigDF[ !(BigDF$ID %in% SmallDF$ID), ]