crtbp: Create an initial population

Description Usage Arguments Value Author(s) Examples

View source: R/crtbp.R

Description

This function creates a binary population of given size and structure.

Usage

1
crtbp(Nind, Lind = NULL, Base = NULL)

Arguments

Nind

- either a number containing the number of individuals in the new population or a row vector of length two containing the number of individuals and their length.

Lind

an optional number containing the length of the individual chromosomes.

Base

an optional number containing the base of the chromosome elements or a row vector containing the base(s) of the loci of the chromosomes.

Value

a list containing following components:

Chrom

a matrix containing the random valued chromosomes row wise.

Lind

a scalar containing the length of the chromosome.

BaseV

a row vector containing the base of the chromosome loci.

Author(s)

The original matlab implementation of mutate was written by Andrew Chipperfield. The R implementation was written by David Zhao.

Examples

1
Chrom = crtbp(40,10)

drizztxx/gatbxr documentation built on Dec. 27, 2021, 2:26 a.m.