Learn R Programming

AFLPsim (version 0.4-2)

plot.demosimhybrid: Plotting demosimhybrid objects

Description

A demosimhybrid object can be plotted using the function plot.demosimhybrid, which is also used as the dedicated plot method. This function plots the frequency of parentals and hybrid classes on each generation.

Usage

## S3 method for class 'demosimhybrid':
plot(x, col = c(2, 3, 4, "orange", "orchid", 7), ...)

Arguments

x
a demosimhybrid object.
col
the colors for the hybrid classes.
...
Arguments to be passed to methods, such as graphical parameters (see par).

encoding

latin1

See Also

demosimhybrid

Examples

Run this code
## Example 1. Simulation under parental proportions,
## similar fecundities and random mating 
inivalues<-c(0.5,0.5,0,0,0,0)
epi0.5<-demosimhybrid(inivalues)
epi0.5
plot.demosimhybrid(epi0.5)

## Example 2. Simulation under higher frecuency of Parental B,
## and higher fecundy of Parental A and random mating
inivalues2<-c(0.25,0.75,0,0,0,0)
fecundities<-c(1,0.5,0.5,0.5,0.5,0.5)
epi0.75<-demosimhybrid(x=inivalues2, F=fecundities)
epi0.75
plot.demosimhybrid(epi0.75)

Run the code above in your browser using DataLab