我正在使用亲属关系2绘制野生种群的谱系,并尝试删除个体的标签。我在par()和plot()中尝试了各种参数,但它们要么没有删除标签,要么导致错误。有任何想法吗?
ped <- pedigree(id,dadid,momid,sex)
plot.pedigree(ped)
我们可以在绘图时将空白""
(或NA
)分配给ids:
#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)))