\name{code.genotype} \alias{code.genotype} \title{ code bi-allele genotype to numerical value } \description{ code a genotype vector, e.g. ("AA", "AC", ...) to a numerical vector based on the count of minor allele, e.g., (0, 1, ...) } \usage{ code.genotype(v) } \arguments{ \item{v}{ character vector of genotypes } } \value{ a numerical vector of genotype } \author{ Wei Sun wsun@bios.unc.edu } \keyword{ methods }