View source: R/createSimKinships.R
createSimKinships | R Documentation |
createSimKinships
uses makeSimPed
with the ped
object
and the allSimParents
object to create a set of kinship matrices to
be used in forming the Monte Carlo estimates for the kinship values.
createSimKinships(ped, allSimParents, pop = NULL, n = 10L, verbose = FALSE)
ped |
The pedigree information in data.frame format |
allSimParents |
list made up of lists where the internal list
has the offspring ID, |
pop |
Character vector with animal IDs to consider as the population of
interest. This allows you to provide a pedigree in |
n |
integer value of the number of simulated pedigrees to generate. |
verbose |
logical vector of length one that indicates whether or not to print out when an animal is missing a sire or a dam. |
A list of n
lists with each internal list containing a
kinship matrix from simulated pedigrees of possible
parents for animals with unknown parents.
library(nprcgenekeepr)
ped <- nprcgenekeepr::smallPed
simParent_1 <- list(id = "A",
sires = c("s1_1", "s1_2", "s1_3"),
dams = c("d1_1", "d1_2", "d1_3", "d1_4"))
simParent_2 <- list(id = "B",
sires = c("s2_1", "s2_2", "s2_3"),
dams = c("d2_1", "d2_2", "d2_3", "d2_4"))
simParent_3 <- list(id = "E",
sires = c("s3_1", "s3_2", "s3_3"),
dams = c("d3_1", "d3_2", "d3_3", "d3_4"))
allSimParents <- list(simParent_1, simParent_2, simParent_3)
pop <- LETTERS[1:7]
simKinships <- createSimKinships(ped, allSimParents, pop, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.