View source: R/filterThreshold.R
filterThreshold | R Documentation |
Part of Group Formation Filters kinship values less than the specified threshold from a long-format table of kinship values.
filterThreshold(kin, threshold = 0.015625)
kin |
a dataframe with columns |
threshold |
numeric value representing the minimum kinship level to be considered in group formation. Pairwise kinship below this level will be ignored. |
The kinship matrix with all kinship relationships below the threshold value removed.
library(nprcgenekeepr)
ped <- nprcgenekeepr::lacy1989Ped
ped$gen <- findGeneration(ped$id, ped$sire, ped$dam)
kmat <- kinship(ped$id, ped$sire, ped$dam, ped$gen)
kin <- kinMatrix2LongForm(kmat, removeDups = FALSE)
kinFiltered_0.3 <- filterThreshold(kin, threshold = 0.3)
kinFiltered_0.1 <- filterThreshold(kin, threshold = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.