Error in kinship2 creating of pedigree object
问题 I am trying to plot very simple pedigrees with kinship2. I only have one generations but lots of different families. id <- sample(1:100, 50, replace=F) dadid <- sample(100:110, 50, replace=T) momid <- sample(111:121, 50, replace=T) sex <- sample(1:3, 50, replace=T) df <- data.frame(cbind(dadid, momid, id, sex)) df<- df %>% mutate(famid = group_indices(., momid, dadid)) When I try and convert my data into a pedigree() object: pedAll <- pedigree( id = id, dadid = dadid, momid = momid, sex = sex