Learn R Programming

selac (version 1.7.5)

PlotExpectedFitness: Function to plot a distribution of fitnesses based on codon equilibrium freqs

Description

Function to plot a distribution of fitnesses based on codon equilibrium freqs

Usage

PlotExpectedFitness(codon.fitnesses.matrices, codon.eq.matrices, values,
  optimal.aa = NULL, palette = "Set1", lwd = 2,
  include.stop.codon = FALSE, type = "histogram", fitness = TRUE,
  numcode = 1, ...)

Arguments

codon.fitnesses.matrices

A 3d array of aa.fitness.matrix returned from ComputeEquilibriumAAFitness (first element in return)

codon.eq.matrices

A 3d array of codon equilibrium frequencies

values

The vector of labels for each matrix (i.e., different Phi values)

optimal.aa

Single letter code for the optimal aa. If NULL, integrates across aa.

palette

Color palette to use from RColorBrewer

lwd

Line width

include.stop.codon

Include stop codons

type

If "histogram", do a histogram plot; if "density", do a density plot

fitness

If TRUE, plot W; if FALSE, plot S (= 1 - W)

numcode

The genetic code

...

Other paramters to pass to plot()