View source: R/ped_subgroups.R
| extractSingletons | R Documentation |
Extract one or more individuals from a pedigree, returning a list of singletons. Marker data and founder inbreeding (if present) are preserved.
extractSingletons(x, ids = NULL, simplify1 = TRUE, keepFI = TRUE)
x |
A |
ids |
A vector of ID labels (coercible to character). If empty, all individuals are extracted. |
simplify1 |
A logical indicating if the output should be simplified to a
singleton object (i.e., removing the outer list structure) if |
keepFI |
A logical indicating if founder inbreeding should be preserved, if present. |
A list of singletons. If length(ids) == 1 and simplify1 = TRUE,
a single singleton object is returned instead.
x = nuclearPed() |> addMarker(geno = c("1/1", NA, "1/2"))
# Extract father and child
extractSingletons(x, ids = c(1,3))
# Extract all members
extractSingletons(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.