我正在使用亲属关系2为野生种群绘制谱系,并尝试删除个人标签。我已经在par()和plot()中尝试了各种参数,但是它们要么不能摆脱标签,要么会导致错误。有什么想法吗?
ped <- pedigree(id,dadid,momid,sex)
plot.pedigree(ped)
答案 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)))