Learn R Programming

monogeneaGM (version 1.1)

matrix2list.2: Partitioning a matrix by row labels into objects of a list

Description

This function partitions a matrix according to row labels and assigns the partitioned submatrices as objects of a list.

Usage

matrix2list.2(x)

Arguments

x
a matrix with row labels, typically species names

Value

a list of objects; the number of objects is equal to the length of levels of the rownames of x. Each object is a matrix with the same row names.

Details

The output from this function is passed as input for boxplotSort.

References

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

See Also

boxplotSort

Examples

Run this code
data(pwed_pd)
data(spcolmap)

pwed_pd <- matrix2list.2(pwed_pd)

cladeI <- spcolmap$species[spcolmap$host %in% "M.buchanani"]
#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)

Run the code above in your browser using DataLab