Function to derive expected kinship
kinship.exp(
  population,
  gen = NULL,
  database = NULL,
  cohorts = NULL,
  depth.pedigree = 7,
  start.kinship = NULL,
  elements = NULL,
  mult = 1,
  storage.save = 1.05,
  verbose = TRUE,
  include.error = TRUE,
  elements.copy = FALSE
)Pedigree-based kinship matrix for in gen/database/cohort selected individuals
Population list
Quick-insert for database (vector of all generations to export)
Groups of individuals to consider for the export
Quick-insert for database (vector of names of cohorts to export)
Depth of the pedigree in generations
Relationship matrix of the individuals in the first considered generation
Vector of individuals from the database to include in pedigree matrix
Multiplicator of kinship matrix (default: 1; set to 2 for a pedigree relationship matrix)
Lower numbers will lead to less memory but slightly higher computing time (default: 1.5, min: 1)
Set to FALSE to not display any prints
Set to FALSE to ignore/correct any errors in the pedigree
Set to TRUE to automatically remove duplicated entries for individuals/database from the output matrix (default: FALSE)
data(ex_pop)
kinship <- kinship.exp(population=ex_pop, gen=2)
Run the code above in your browser using DataLab