powered by
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)
A list of singletons. If length(ids) == 1 and simplify1 = TRUE, a single singleton object is returned instead.
length(ids) == 1
simplify1 = TRUE
singleton
A ped object or a list of such.
ped
A vector of ID labels (coercible to character). If empty, all individuals are extracted.
A logical indicating if the output should be simplified to a singleton object (i.e., removing the outer list structure) if ids has length 1.
ids
A logical indicating if founder inbreeding should be preserved, if present.
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)
Run the code above in your browser using DataLab