struct2pegas: Conversion of class 'struct' to class 'loci'

View source: R/compute_summaries.R

struct2pegasR Documentation

Conversion of class struct to class loci

Description

This function converts an object of class "struct" to an object of class "loci" that can be used by the package pegas

Usage

struct2pegas(x)

Arguments

x

List of objects of class "struct" with the initial genetic structure of populations.

Examples

## We first create a random population with 100 individuals and 10 biallelic loci
N <- 100  # Population size
nl <- 10  # Number of additive loci
na <- 2  # Number of alleles per locus
G <- initial.struct(N,nl,na)

## We convert the object of class 'struct' into 'loci'
struct2pegas(list(G))

eriqande/glads documentation built on Jan. 26, 2024, 9:25 p.m.