slideBoxplots {spider} | R Documentation |
Boxplots across windows
Description
Calculates boxplots of genetic distances using sliding windows.
Usage
slideBoxplots(DNAbin, sppVector, width, interval = 1, method = "nonCon")
Arguments
DNAbin |
A DNA alignment of class ‘DNAbin’. |
sppVector |
A species vector (see |
width |
Width of windows. |
interval |
Distance between each window in number of base pairs.
Default of 1. Giving the option of |
method |
Options of |
Details
Giving method="overall"
calculates the boxplot for the distance
matrix of each window.
Giving method="interAll"
calculates boxplots for the inter- and
intra-specific distances of each window, showing the result for ALL
inter-specific distances.
Giving method="nonCon"
calculates boxplots for the inter- and
intra-specific distances of each window, showing the result for only the
nearest-conspecific distances for each individual.
Value
A list with
treeMeasures |
Logical. Tree measures calculated? Always FALSE. |
distMeasures |
Logical. Distance measures calculated? Always FALSE. |
bp_out |
If |
bp_InterSpp_out |
If |
bp_IntraSpp_out |
If |
bp_range_out |
range of y-axis values. |
pos_out |
x-axis values. |
boxplot_out |
Logical. Boxplots calculated? Always TRUE. |
method |
The method used for calculating boxplots. |
Author(s)
Samuel Brown <s_d_j_brown@hotmail.com>
See Also
boxplot
, plot.slidWin
,
slideAnalyses
, slidingWindow
.
Examples
data(dolomedes)
doloDist <- ape::dist.dna(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)
doloNonCon <- slideBoxplots(dolomedes, doloSpp, 200, interval=10)
graphics::plot(doloNonCon)
doloOverall <- slideBoxplots(dolomedes, doloSpp, 200, interval=10, method="overall")
graphics::plot(doloOverall)
doloInterall <- slideBoxplots(dolomedes, doloSpp, 200, interval=10, method="interAll")
graphics::plot(doloInterall)