gvec_to_gcount: Inverse function of 'gcount_to_gvec()'.

View source: R/rscripts.R

gvec_to_gcountR Documentation

Inverse function of gcount_to_gvec().

Description

Inverse function of gcount_to_gvec().

Usage

gvec_to_gcount(gvec, ploidy = 4)

Arguments

gvec

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

ploidy

The ploidy of the species.

Value

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

Author(s)

David Gerard

See Also

gcount_to_gvec()

Examples

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


segtest documentation built on July 1, 2025, 1:07 a.m.