从kinship2系谱图中删除标签

时间:2019-03-18 09:22:26

标签: r bioinformatics

我正在使用亲属关系2为野生种群绘制谱系,并尝试删除个人标签。我已经在par()和plot()中尝试了各种参数,但是它们要么不能摆脱标签,要么会导致错误。有什么想法吗?

pedigree plot

ped <- pedigree(id,dadid,momid,sex)
plot.pedigree(ped)

1 个答案:

答案 0 :(得分:0)

在绘制时,我们可以将空白""(或NA)分配给ID:

#Example pedigrees object the manuals
library(kinship2)
data(sample.ped)
pedAll <- pedigree(sample.ped$id, sample.ped$father, sample.ped$mother, 
                   sample.ped$sex,  #affected=sample.ped$affected,
                   affected=cbind(sample.ped$affected, sample.ped$avail), 
                   famid=sample.ped$ped)
ped2 <- pedAll['2']

#assign "" to id argument.
plot.pedigree(ped2, id = rep("", length(ped2$id)))

#or NA
#plot.pedigree(ped2, id = rep(NA, length(ped2$id)))

enter image description here