Learn R Programming

simer (version 1.0.0)

generate.pop: Population generator

Description

Generate population according to the number of individuals.

Usage

generate.pop(pop.ind = 100, from = 1, ratio = 0.5, gen = 1)

Value

a data frame of population information.

Arguments

pop.ind

the number of the individuals in a population.

from

initial index of the population.

ratio

sex ratio of males in a population.

gen

generation ID of the population.

Author

Dong Yin

Details

Build date: Nov 14, 2018 Last update: Apr 28, 2022

Examples

Run this code
pop <- generate.pop(pop.ind = 100)
head(pop)

Run the code above in your browser using DataLab