Learn R Programming

delimtools (version 0.2.0)

bgmyc_tbl: Turns bGMYC Results Into a Tibble

Description

bgmyc_tbl() processes output from bgmyc.singlephy into an object of class tbl_df.

Usage

bgmyc_tbl(bgmyc_res, ppcutoff = 0.05, delimname = "bgmyc")

Value

an object of class tbl_df.

Arguments

bgmyc_res

Output from bgmyc.singlephy.

ppcutoff

Posterior probability threshold for clustering samples into species partitions. See bgmyc.point for details. Default to 0.05.

delimname

Character. String to rename the delimitation method in the table. Default to 'bgmyc'.

Author

Noah M. Reid.

Details

bGMYC package uses spec.probmat to create a matrix of probability of conspecificity and bgmyc.point to split samples into a list which individuals meets the threshold specified by ppcutoff. bgmyc_tbl() wraps up these two functions into a single one and turns these inputs into a tibble which matches the output from gmyc_tbl and locmin_tbl.

Examples

Run this code

# \donttest{
# run bGMYC
bgmyc_res <- bGMYC::bgmyc.singlephy(ape::as.phylo(geophagus_beast),
  mcmc = 11000,
  burnin = 1000,
  thinning = 100,
  t1 = 2,
  t2 = ape::Ntip(geophagus_beast),
  start = c(1, 0.5, 50)
)

# create a tibble
bgmyc_df <- bgmyc_tbl(bgmyc_res, ppcutoff = 0.05)

# check
bgmyc_df
# }

Run the code above in your browser using DataLab