write_partitioned_alignments {EvoPhylo} | R Documentation |
Write character partitions as separate Nexus files (for use in BEAUti)
Description
Write character partitions as separate Nexus files (for use in BEAUti)
Usage
write_partitioned_alignments(x, cluster_df, file)
Arguments
x |
character data matrix as Nexus file (.nex) or data frame (with taxa as rows and characters as columns) read directly from local directory |
cluster_df |
cluster partitions as outputted by |
file |
path to save the alignments. If |
Value
no return value
Examples
# Load example phylogenetic data matrix
data("characters")
# Create distance matrix
Dmatrix <- get_gower_dist(characters)
# Find optimal partitioning scheme using PAM under k=3 partitions
cluster_df <- make_clusters(Dmatrix, k = 3)
# Write to Nexus files
## Not run: write_partitioned_alignments(characters, cluster_df, "example.nex")
[Package EvoPhylo version 0.3.2 Index]