plot.SFS_class: Site frequency spectrum plot

Description Usage Arguments Details Examples

View source: R/plot_SFS_class.R

Description

Plots the site frequency spectrum.

Usage

1
2
3
## S3 method for class 'SFS_class'
plot(SFS, xlab = "Index i",
  ylab = "Number of i-tons", main = "Site frequency spectrum", ...)

Arguments

SFS

vector with the site frequency spectrum of class 'SFS_class'.

xlab

a title for the x axis. Is by default "Index i". See title.

ylab

a title for the y axis. Is by default "Number of i-tons". See title.

main

an overall title for the plot. Is by default "Site frequency spectrum". See title.

...

arguments passed on from plot.

Details

The terminology "Number of i-tons" corresponds to the i'th entry in the site frequency spectrum. See SFS for further explanation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Using the functions simDNAseq and SFS:
DNAmat <- simDNAseq(n = 24, seqLen = 58, mutRate = 7,
                    popType = "sudExpPop", expansionTime = 3,
                    proportion = 0.6)
plot(SFS(DNAmat), col="green")


# Creating the SFS vector by hand:
SFSvec <- c(2, 4, 1, 0, 0)
class(SFSvec) <- "SFS_class"
plot(SFSvec)

aumath-advancedr2019/simDNA documentation built on Nov. 27, 2019, 11 a.m.