Learn R Programming

segtest (version 2.0.0)

gvec_to_gcount: Inverse function of gcount_to_gvec().

Description

Inverse function of gcount_to_gvec().

Usage

gvec_to_gcount(gvec, ploidy = 4)

Value

A vector of counts. Element k is the number of individuals with genotype k-1.

Arguments

gvec

The vector of genotypes. gvec[i] is the genotype for individual i.

ploidy

The ploidy of the species.

Author

David Gerard

See Also

gcount_to_gvec()

Examples

Run this code
gvec <- c(1, 2, 3, 2, 3, 1, 4, 0, 1, 0, 0, 1, 0, 0)
gvec_to_gcount(gvec = gvec)

Run the code above in your browser using DataLab