| subsetCross | R Documentation |
Subset an R/qtl object by chromosome or by individuals for populations used within the R/ASMap package.
subsetCross(cross, chr, ind, ...)
cross |
A |
chr |
Optional vector specifying which chromosomes to keep or
discard. This may be a logical, numeric, or character string
vector. See |
ind |
Optional vector specifying which individuals to keep or discard. This may be a logical or numeric vector (see Details). |
... |
Kept for compatability with |
This function is a replacement version of subset.cross that should be
used if the cross object contains any or all of the components "co.located",
"seg.distortion" and "missing" created by a
pullCross call. For a given ind, the function calls
subset.cross to ensure that all elements created from calls to
native R/qtl functions are subsetted appropriately. In addition,
the "co.located", "seg.distortion" and "missing"
elements are also subsetted and if components "seg.distortion"
and "missing" exist, statistics in their respective tables are
recalculated.
It provides identical functionality to subset.cross
with the exception that ind can only be a logical or numeric
vector.
The cross object is returned with the appropriate subsetting.
Julian Taylor
Taylor, J., Butler, D. (2017) R Package ASMap: Efficient Genetic Linkage Map Construction and Diagnosis. Journal of Statistical Software, 79(6), 1–29.
subset.cross and pullCross
data(mapDH, package = "ASMap")
mapDH.s <- pullCross(mapDH, type = "seg.distortion")
mapDH.s <- subsetCross(mapDH.s, ind = 3:218)
dim(mapDH.s$seg.distortion$data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.