Learn R Programming

fsthet (version 1.0.1)

allele.counts: This counts the number of alleles at a locus.

Description

This counts the number of times each allele occurs at a locus from a list of genotypes (the sum of all the counts is 2*number of individuals).

Usage

allele.counts(genotypes)

Arguments

genotypes

A list of genotypes.

Value

AlleleCounts

The number of times each allele is recorded at the locus.

Examples

Run this code
# NOT RUN {
  #create a random sample of genotypes
  genotypes<-sample(c("0101","0102","0202"),50,replace=TRUE)
  counts<-allele.counts(genotypes)
# }

Run the code above in your browser using DataLab