frequency_matrix: Create a matrix of allele frequencies for a single locus...

View source: R/frequency_matrix.R

frequency_matrixR Documentation

Create a matrix of allele frequencies for a single locus across many strata

Description

This is a quick translation of locus data to a tabular stratum format.

Usage

frequency_matrix(x, stratum = "Population", loci = NULL)

Arguments

x

A data.frame with locus and strata column(s)

stratum

The column name to use as the partitioning

loci

The name of the locus to use

Value

A matrix (rows are strata, columns are alleles) of allele frequencies

Note

This function just reshapes the data.frame from frequencies.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu


dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.