Open lwjohnst86 opened 6 years ago
To identify uncle and aunts we have to left join the data table (id,fid,mid) by fid and mid, renaming the sibling data table.
DT <- c("id","fid","mid") Fua <- Fsib names(Fua) <- c("fid","Funcle","Faunt") DT2 <- DT[Fua, on="fid"] Mua <- Fsib names(Mua) <- c("mid","Muncle","Maunt") DT3 <- Mua[DT, on="mid"]
The next step will be to merge with original data table (id, fid, mid)
To identify uncle and aunts we have to left join the data table (id,fid,mid) by fid and mid, renaming the sibling data table.
The next step will be to merge with original data table (id, fid, mid)