Learn R Programming

hzar (version 0.2-5)

hzar.plot.cline: Generate a plot of the cline.

Description

Plots a line representing the expected frequency versus distance for the given object. For hzar.dataGroup and hzar.obsDataGroup objects, plots the observed data backing the model. For hzar.obsDataGroup objects, plots the maximum likelihood cline for each model.

Usage

hzar.plot.cline(cline, add = FALSE, ylim=FALSE, ...)

Arguments

cline
A hzar.cline, hzar.dataGroup or hzar.obsDataGroup object.
add
Add to an existing plot if TRUE.
ylim
Grapical parameter passed to plot. If FALSE, determine ylim from cline if needed.
...
Arguments to be passed to methods, such as graphical parameters (see plot).

See Also

plot

Examples

Run this code
data(manakinMolecular);
mknAdaA <-
  hzar.doMolecularData1DPops(manakinMolecular$distance,
                             manakinMolecular$ada.A,
                             manakinMolecular$ada.nSamples);
hzar.plot.obsData(mknAdaA);
mknAdaAmodel <-
  hzar.makeCline1DFreq(mknAdaA, scaling="fixed",tails="none");
mknAdaAmodel <-
  hzar.model.addBoxReq(mknAdaAmodel,-30,600);
mknAdaAmodelFitR <-
   hzar.first.fitRequest.old.ML(model=mknAdaAmodel ,
                                mknAdaA,
                                verbose=FALSE);
mknAdaAcline <- hzar.gen.cline(list(center=300,width=10),
                               mknAdaAmodelFitR);
hzar.plot.cline(mknAdaAmodelFitR);
hzar.plot.cline(mknAdaAcline,add=TRUE);

Run the code above in your browser using DataLab