powered by
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).
allele.counts(genotypes)
A list of genotypes.
The number of times each allele is recorded at the locus.
# 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