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

View source: R/check_data.R

incompR Documentation

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


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)])

poppr documentation built on May 29, 2024, 5:54 a.m.