View source: R/check_phylo_data.R
check_phylo_data | R Documentation |
\linkS4class{phylo4d}
object conforms
to the requirements of the DAISIEprep package. If the function does not
return anything the data is ready to be used, if an error is returned the
data requires some pre-processing before DAISIEprep can be usedChecks whether \linkS4class{phylo4d}
object conforms
to the requirements of the DAISIEprep package. If the function does not
return anything the data is ready to be used, if an error is returned the
data requires some pre-processing before DAISIEprep can be used
check_phylo_data(phylod)
phylod |
A |
Nothing or error message
set.seed(
1,
kind = "Mersenne-Twister",
normal.kind = "Inversion",
sample.kind = "Rejection"
)
phylo <- ape::rcoal(10)
phylo$tip.label <- c("bird_a", "bird_b", "bird_c", "bird_d", "bird_e",
"bird_f", "bird_g", "bird_h", "bird_i", "bird_j")
phylo <- phylobase::phylo4(phylo)
endemicity_status <- sample(
c("not_present", "endemic", "nonendemic"),
size = length(phylobase::tipLabels(phylo)),
replace = TRUE,
prob = c(0.6, 0.2, 0.2)
)
phylod <- phylobase::phylo4d(phylo, as.data.frame(endemicity_status))
check_phylo_data(phylod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.