Learn R Programming

RADami (version 1.1-2)

plot.partitionedRAD: Plot a

Description

This function creates a plot with 1 or more panels describing the number of loci supporting, disfavoring, or ambiguous for each tree, plotted against log-likelihood

Usage

# S3 method for partitionedRAD
plot(x, 
     fileprefix = NULL,
     lnL.break = NULL,
     regression = NULL,
     ci = NULL,
     widthScalar = .85,
     panels = c('bestMat', 'worstMat', 'doubleCountMat'),
     squareSize = switch(as.character(length(panels)), '2' = 5, '3' = 3),
     primeTreeColor = 'red',
     primeTreeCharacter = 19,
     highlight.points = NULL, 
     highlight.colors = NULL,
     filebase = 'DEFAULT',
     ...)

Arguments

x
an object of class partitionedRAD
fileprefix
prefix of the files to save; as written, you have to provide some prefix to identify the files if you want a pdf, but the remainder of the file name defaults to a combination of parameters and date
lnL.break
a numeric vector, which should be the length of panels; if not null, the lowest tree likelihood to show on each panel
regression
a boolean vector, which should be the length of panels; if not null, whether to draw a linear fit line on each panel
ci
a numeric vector, the length of panels; what CI to show on each regression, or 0 for no CI
widthScalar
a multiplier on the width of the entire plot to get the plotting panels square or not as you prefer
panels
a character vector describing the order of panels; can be any of "bestMat", "worstMat", "doubleCountMat" in any order
squareSize
the size of the panels in inches; defaults to 5" for a 2-panel plot, 3" for a 3-panel plot, only because that works well in my trials
primeTreeColor
the color of the dot representing the first tree in the matrix, which should be your original tree (unpermuted) if you've been following the workflow from genTrees through this final and exciting plot
primeTreeCharacter
the character of the dot representing the first tree in the matrix
highlight.points
number of any trees to highlight
highlight.colors
colors vector or single color for highlighted points
filebase
the base of the file name for exported plots
additional arguments passed to plot and rank.partitionedRAD

Value

This function is called primarily for its side-effect of printing plots to a file. It returns, invisibly, a list of the fit objects for each panel, only relevant if you set any elements of regression to TRUE.

Details

The x-axis will either be the tree likelihoods estimated by RAxML in a separate analysis (e.g., using the entire dataset), or the summed locus likelihoods from the partitioned RAD analysis if no filename is provided. This function as written prints to pdf if you enter a fileprefix, to the screen if you don't. Default filebase pastes rad.partitioned with the date and the parameter values used. If default filebase is not desired, enter something other than "DEFAULT."

References

Hipp A.L., Eaton D.A.R., Cavender-Bares J., Fitzek E., Nipper R. & Manos P.S. (Accepted pending revision). A framework phylogeny of the American oak clade based on sequenced RAD data. PLoS ONE.

See Also

rank.partitionedRAD, plot.locus.dist