Learn R Programming

poppr (version 2.6.1)

incomp: Check for samples that are incomparable due to missing data

Description

If two samples share no loci typed in common, they are incomparable and will produce missing data in a distance matrix, which could lead to problems with further analyses. This function finds these samples and returns a matrix of how many other samples these are incomparable with.

Usage

incomp(gid)

Arguments

gid

a genind or genclone object

Value

a square matrix with samples that are incomparable

Examples

Run this code
# NOT RUN {
data(nancycats)
# These two populations have no samples that are incomparable
incomp(nancycats[pop = c(1, 17)])

# If you reduce the number of loci, we find that there are 
# incomparable samples.
incomp(nancycats[pop = c(1, 17), loc = c(1, 4)])
# }

Run the code above in your browser using DataLab