| locmin_tbl | R Documentation |
locmin_tbl() processes output from tclust into an object of
class tbl_df.
locmin_tbl(distobj, threshold = 0.01, haps = NULL, delimname = "locmin")
distobj |
A distance object (usually from dist.dna). |
threshold |
Distance cutoff for clustering. Default of 0.01. See localMinima for details. |
haps |
Optional. A vector of haplotypes to keep into the tbl_df. |
delimname |
Character. String to rename the delimitation method in the table. Default to 'locmin'. |
spider package uses localMinima to
determine possible thresholds for any distance matrix and tclust
to cluster samples within a given threshold into species partitions.
locmin_tbl() turns these inputs into a tibble which matches
the output from gmyc_tbl and bgmyc_tbl.
An object of class tbl_df.
Samuel Brown.
Brown S.D.J., Collins R.A., Boyer S., Lefort M.-C., Malumbres-Olarte J., Vink C.J., Cruickshank, R.H. 2012. Spider: An R package for the analysis of species identity and evolution, with particular reference to DNA barcoding. Molecular Ecology Resources, 12: 562-565.
# create a distance matrix
mat <- ape::dist.dna(geophagus, model = "raw", pairwise.deletion = TRUE)
# run Local Minima
locmin_res <- spider::localMinima(mat)
# create a tibble
locmin_df <- locmin_tbl(mat,
threshold = locmin_res$localMinima[1],
haps = ape::as.phylo(geophagus_beast)$tip.label)
# check
locmin_df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.