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

Description Usage Arguments Value Examples

View source: R/check_data.R

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

1
incomp(gid)

Arguments

gid

a genind or genclone object

Value

a square matrix with samples that are incomparable

Examples

1
2
3
4
5
6
7
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 Feb. 7, 2021, 1:06 a.m.