write_partitioned_alignments | R Documentation |
Write character partitions as separate Nexus files (for use in BEAUti)
write_partitioned_alignments(x, cluster_df, file)
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 |
no return value
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.