phenotype.freq | R Documentation |
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.
phenotype.freq(nloci=6, p=NULL, effect=1/nloci) phenotype.selection(nloci=6, p=NULL, effect=1/nloci, beta=0.1, ngen=20, ...)
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 |
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.)
Liam Revell liam.revell@umb.edu
clt
, selection
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.