getGenotypes {pedtools} | R Documentation |
Genotype matrix
Description
Extract the genotypes of multiple individuals/markers in form of a matrix.
Usage
getGenotypes(x, ids = NULL, markers = NULL, sep = "/", missing = "-")
Arguments
x |
A |
ids |
A vector of ID labels. If NULL (default) all individuals are included. |
markers |
A vector of indices or names of markers attaches to |
sep |
A single string to be used as allele separator in marker genotypes. |
missing |
A single string to be used for missing alleles. |
Value
getGenotypes()
returns a character matrix with length(ids)
rows
and length(markers)
columns.
See Also
Examples
x = nuclearPed() |>
addMarker(`2` = "1/2", name = "m1") |>
addMarker(`3` = "a/a", name = "m2")
getGenotypes(x)
### A list of pedigrees
s = transferMarkers(x, singleton("s"))
peds = list(x, s)
getGenotypes(peds)
[Package pedtools version 2.7.0 Index]