smooth_rec {nichevol} | R Documentation |
Smooth character table values resulted from ancestral character state reconstructions
Description
Smooth character table values resulted from ancestral character state reconstructions
Usage
smooth_rec(whole_rec_table)
Arguments
whole_rec_table |
matrix containing all reconstructed characters for all
tips and nodes. It results from using the functions |
Value
The matrix of reconstructed characters with smoothed values.
Examples
# a simple tree
data("tree5", package = "nichevol")
# simple matrix of data
dataTable <- cbind("241" = rep("1", length(tree5$tip.label)),
"242" = rep("1", length(tree5$tip.label)),
"243" = c("1", "1", "0", "0", "0"),
"244" = c("1", "1", "0", "0", "0"),
"245" = c("1", "?", "0", "0", "0"))
rownames(dataTable) <- tree5$tip.label
treeWdata <- geiger::treedata(tree5, dataTable)
# ancestral reconstruction
parsimonyReconstruction <- bin_par_rec(treeWdata)
# smoothing reconstructions
smooth_rec(parsimonyReconstruction)
[Package nichevol version 0.1.20 Index]