powered by
Identifies markers for which two individuals have the same (non-missing) genotype. The comparison is done after sorting the genotypes internally.
sameGenotype(x, ids = typedMembers(x), count = FALSE)
A logical vector with one entry per marker (NA if either genotype is missing). If count = TRUE, the number of TRUE entries.
NA
count = TRUE
TRUE
A ped object or a list of such. An error is raised if x has no marker data.
ped
x
A vector of two individual ID labels.
A logical. If TRUE, return the number of markers with shared genotype.
isHomozygous(), sortGenotypes()
isHomozygous()
sortGenotypes()
x = nuclearPed() |> addMarker(name = "m1", geno = c(NA, "1/1", "1/2")) |> addMarker(name = "m2", geno = c(NA, "1/2", "2/1")) sameGenotype(x, 2:3) sameGenotype(x, 2:3, count = TRUE)
Run the code above in your browser using DataLab