Learn R Programming

micropan (version 1.0)

plot.Rarefac: Plotting and printing Rarefac objects

Description

Generic functions for plotting and printing the content of a Rarefac object.

Usage

"plot"(x,type="b", pch=16, xlab="Genomes", ylab="Number of unique gene clusters", ... ) "summary"(object, ...) "str"(object, ...)

Arguments

x
A Rarefac object, see below.
object
A Rarefac object, see below.
type
Type of plot, default is "b", giving markers with lines between.
pch
Marker type, default is 16, a filled circle.
xlab
Text for horizontal axis.
ylab
Text for vertical axis.
...
Optional graphical arguments.

Details

A Rarefac object is a small (S3) extension to a matrix. The first column contains the cumulative number of unique gene clusters found when considering 1,2,...,G genomes in a pan-matrix. Thus, the Rarefac object is a matrix with G rows. Any additional columns will hold similar numbers, but for random shufflings of the genome's ordering. A Rarefac object is typically created by the function rarefaction. The plot.Rarefac function will display the content of the Rarefac object as a plot of the mean value in rows 1,2,...,G, where G is the total number of genomes in the study. The summary.Rarefac function will display a text giving the same information as plot.Rarefac. The str.Rarefac function will simply print the number of genomes of the Rarefac object.

See Also

rarefaction, heaps.

Examples

Run this code
# Loading a Panmat objects in the micropan package
data(list="Mpneumoniae.blast.panmat",package="micropan")

# Computing Rarefaction
rarefac.blast <- rarefaction(Mpneumoniae.blast.panmat,n.perm=100)


# Plotting and printing the Rarefac object
plot(rarefac.blast)
summary(rarefac.blast)
str(rarefac.blast)

Run the code above in your browser using DataLab