| nMarkers | R Documentation |
The number of markers attached to a pedigree
nMarkers(x, compwise = FALSE)
hasMarkers(x, compwise = FALSE)
x |
A |
compwise |
A logical, only relevant if |
nMarkers() by default returns a single number; the number of marker
objects attached to x. If x is a ped list, an error is raised if the
components have different numbers of markers. This check can be skipped by
setting compwise = TRUE, in which case the function returns a vector of
the component-wise marker numbers.
The function hasMarkers(x) returns TRUE if (at least component of) x
has attached markers, otherwise FALSE. If compwise = TRUE, a logical
vector of the same length as x.
x = nuclearPed() |> addMarker()
nMarkers(x) # = 1
y = list(x, singleton(1))
nMarkers(y, compwise = TRUE) # c(1,0)
hasMarkers(y) # TRUE
hasMarkers(y, compwise = TRUE) # c(TRUE, FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.