Learn R Programming

GeneticSubsetter (version 0.8)

HET: Heterozygosity Calculator

Description

This function calculates the Expected Heterozygosity (HET; called PIC in earlier versions and in the paper describing this package) of a set of genotypes.

Usage

HET(data)

Arguments

data
A matrix of genotypes, where each column is one individual, each row is one marker, and marker values are 1, 0, or -1, or NA, where 0 represents a heterozygous marker, and NA represents missing data. Note that this coding is different from the earlier PicCalc, which cannot handle heterozygous markers. All data in this matrix must be numeric.

Value

The mean Heterozygosity of all markers for the given set of genotypes.

Examples

Run this code
data("genotypes")
HET(genotypes)

Run the code above in your browser using DataLab