phenotype.freq: Computes phenotypic distribution and its change through time...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/evolution.R

Description

phenotype.freq computes the phenotypic trait distribution for a polygenic trait. Can be used to demonstrate that the phenotypic distribution of a polygenic trait will tend to normality as the number of loci is increased, regardless of the allele frequencies at each locus.

phenotype.selection computes the change in the phenotypic trait distribution through time under natural selection. Can be used to show that natural selection on a polygenic trait can move the value of the trait well beyond its original distribution in the population.

Usage

1
2
	phenotype.freq(nloci=6, p=NULL, effect=1/nloci)
	phenotype.selection(nloci=6, p=NULL, effect=1/nloci, beta=0.1, ngen=20, ...)

Arguments

nloci

number of loci. For simplicity all loci are assumed to be biallelic.

p

allele frequency, p, for each locus, in a vector. If not supplied, initially frequencies will be assumed to be 0.5 at all loci.

effect

additive effect of an allele substitution. For simplicity, this is assumed to be the same at all loci.

beta

selection gradient.

ngen

number of generations to analyze.

...

optional arguments. Presently the only optional argument in the function phenotype.selection is sleep, which can be used to specify the time delay in seconds between generations.

Value

Creates a plot or animation.

phenotype.freq also invisibly returns an object of class "phenotype.freq" that can be printed or re-plotted using print and plot methods corresponding to the object type. (See examples.)

Author(s)

Liam Revell liam.revell@umb.edu

See Also

clt, selection

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	## Not run: 
		phenotype.freq(n=4)
		object<-phenotype.freq(nloci=6,p=runif(n=6),effect=1/6)
		print(object)
		plot(object)
		object<-phenotype.freq(nloci=10,p=runif(n=10),effect=rexp(n=10))
		print(object)
		plot(object)
		phenotype.selection(ngen=100)
	
## End(Not run)

learnPopGen documentation built on May 21, 2019, 1 a.m.