# Calculate the index of association between samples in a genlight object.

Source:`R/bitwise.r`

`bitwise.ia.Rd`

This function parses over a genlight object to calculate and return the index of association for those samples.

## Arguments

- x
- missing_match
a boolean determining whether missing data should be considered a match. If TRUE (default) missing data at a locus will match with any data at that locus in each comparison. If FALSE, missing data at a locus will cause all comparisons to return the maximum possible distance at that locus (ie, if sample 1 has missing data at locus 1, and sample 2 is heterozygous at locus 1, the distance at that locus will be 1. If sample 2 was heterozygous or missing at locus 1, the distance would be 2.

- differences_only
a boolean determining how distance should be counted for diploids. Whether TRUE or FALSE the distance between a heterozygous locus and a homozygous locus is 1. If FALSE (default) the distance between opposite homozygous loci is 2. If TRUE that distance counts as 1, indicating only that the two samples differ at that locus.

- threads
The maximum number of parallel threads to be used within this function. A value of 0 (default) will attempt to use as many threads as there are available cores/CPUs. In most cases this is ideal. A value of 1 will force the function to run serially, which may increase stability on some systems. Other values may be specified, but should be used with caution.