View source: R/marker_genomatrix.R
getGenotypes | R Documentation |
Extract the genotypes of specified individuals and markers from a pedigree object, and return them as a character matrix.
getGenotypes(x, ids = NULL, markers = NULL, sep = "/", missing = "-")
x |
A |
ids |
A vector of ID labels, or a function operating on |
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. |
getGenotypes()
returns a character matrix with length(ids)
rows and
length(markers)
columns.
getAlleles()
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)
# Using a function to select individuals
getGenotypes(x, ids = typedMembers)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.