Learn R Programming

learnPopGen (version 1.0.4)

rcd: Simulation of reproductive character displacement in an ecological community

Description

This function conducts individual-based, genetically explicit numerical simulation of reproductive character displacement in an ecological community. The model is one of multiple species (with fixed relative abundance) competing to utilize the same signal space. There is both stabilizing selection on the signal trait for detectability, as well as (in multi-species simulations) countervailing selection for divergence due to the costs of erroneous mismating attempts.

Usage

rcd(nsp=3, nindivs=c(700,400,100), w_t=10, gen=c(500,500), figs="on", pf=100, ...)

Arguments

nsp

Number of species in the simulation. If figs="on", nsp must be 1, 2, or 3.

nindivs

A vector of length nsp containing the integer number of individuals in each species of the simulation.

w_t

Shape parameter of the Gaussian selection surface for the male signalling trait.

gen

Vector containing the number of allopatric generations followed by the number of sympatric generations for simulation.

figs

Either "on" if plotting is turned on, or "off" to suppress plotting.

pf

Print frequency for the simulation status to screen.

...

Optional arguments.

Value

The function returns a list containing the mean male signal trait and the mean female preference over time. It also (optionally) plots these.

See Also

drift.selection, genetic.drift, freqdep, selection

Examples

Run this code
# NOT RUN {
	
# }
# NOT RUN {
		obj<-rcd(nsp=2,nindivs=c(500,500))
	
# }

Run the code above in your browser using DataLab