Learn R Programming

simer (version 1.0.0)

mate: Mate

Description

Mating according to the indice of sires and dams.

Usage

mate(pop.geno, index.sir, index.dam, ncpus = 0)

Value

a genotype matrix after mating

Arguments

pop.geno

the genotype data.

index.sir

the indice of sires.

index.dam

the indice of dams.

ncpus

the number of threads used, if NULL, (logical core number - 1) is automatically used.

Author

Dong Yin

Details

Build date: Nov 14, 2018 Last update: Jan 28, 2025

Examples

Run this code
# \donttest{
# Generate the genotype data
SP <- param.geno(pop.marker = 1e4, pop.ind = 1e2)
SP <- genotype(SP)
pop.geno <- SP$geno$pop.geno$gen1

# The mating design
index.sir <- rep(1:50, each = 2)
index.dam <- rep(51:100, each = 2)

# Mate according to mating design
geno.curr <- mate(pop.geno = pop.geno, index.sir = index.sir,
                  index.dam = index.dam)
geno.curr[1:5, 1:5]
# }

Run the code above in your browser using DataLab