Skip to contents

Random Mating

Usage

randomMate(inds, n, names)

Arguments

inds

Vector of the selected individuals' names

n

Total number of cross to perform

names

Names of the new individuals.

Value

data.frame of the crossing table

Examples

nCross <- 10
inds <- paste0("ind-", seq(1:5))
names <- paste0("newInd-", seq(1:nCross))
randomMate(inds, nCross, names)
#>     ind1  ind2 n     names
#> 1  ind-4 ind-5 1  newInd-1
#> 2  ind-2 ind-5 1  newInd-2
#> 3  ind-2 ind-3 1  newInd-3
#> 4  ind-2 ind-5 1  newInd-4
#> 5  ind-1 ind-5 1  newInd-5
#> 6  ind-2 ind-3 1  newInd-6
#> 7  ind-3 ind-5 1  newInd-7
#> 8  ind-5 ind-1 1  newInd-8
#> 9  ind-1 ind-3 1  newInd-9
#> 10 ind-4 ind-4 1 newInd-10