boxplotSort: Median-ordered box plot

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/boxplotSort.R

Description

This is a modification of the standard box plot to produce box plots ordered on the basis of descending median, for more effective graphical representation of data.

Usage

1
2
boxplotSort(x, italic = FALSE, srt = 45, df = 0.5, varwidth = TRUE,
  col = NULL, ylab = "", main = "", clade = NULL)

Arguments

x

a list, with species as the names of the list

italic

if TRUE, the species names are italicized

srt

the angle of the x-axis labels relative to the x-axis

df

displacement factor for positioning x-axis labels

varwidth

if TRUE, the width of the box plot for a species is proportional to the square root of the species's sample size

col

a character vector specifying the box colors for two clades

ylab

y-axis title

main

title for the plot

clade

a character vector specifying the species names for the first clade; currently supports only two clades

Details

The box plots produced using this function are helpful for documenting sample quality score distributions of each species. They are also useful for checking the distribution of pairwise Euclidean distance between two landmarks.

Author(s)

Tsung Fei Khang tfkhang@um.edu.my

References

Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.

See Also

Qscore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(pwed_pd)
pwed_pd <- matrix2list.2(pwed_pd)

cladeI <- c("liewi","fenestrum","grandis","johorensis","kedahensis","kederai")
#We just want to look at distance between LM1 and LM3 in for dorsal anchor
boxplotSort(lapply(pwed_pd, function(k) k[,which(colnames(k)=="D1_3")]), italic=TRUE,
col=c("dodgerblue","violetred"), clade=cladeI,
ylab=expression(paste("Length ", "(", italic(mu),"m", ")")))

#Separation of two lineage seems possible at 15 micrometers
abline(h=15)

monogeneaGM documentation built on May 29, 2017, 9:18 p.m.