Learn R Programming

PhyInsight (version 0.1.0)

savePhytree: Save a Phylogenetic Tree Object

Description

Create a phylogenetic tree PDF using a phylo tree object and a specimen dataframe.

Usage

savePhytree(
  phyloTree,
  specimen_dataframe,
  label_offset = 5.5e-05,
  label_size = 0.3,
  tree_file_name = "Phylogenetic_Tree.pdf",
  openPDF = FALSE,
  savePDF = FALSE
)

Value

A PDF file.

Arguments

phyloTree

A phylo tree object.

specimen_dataframe

A specimen dataframe.

label_offset

A numerical value to set the label offset distance.

label_size

A numerical value to set the label size.

tree_file_name

An optional character string to name the PDF file.

openPDF

A logical value to state whether to open the PDF file.

savePDF

A logical value to state whether to save the PDF file to the working directory. If FALSE the file will be saved to a temporary directory but will still be able to open.

Examples

Run this code
# create and plot a phylo tree
specdf_Anth <- querySpecData("Antheraea polyphemus")[1:10,]

DNABin_Anth <- genDNABin(specdf_Anth)

DNAStringset_Anth <- genDNAStringSet(DNABin_Anth)

DNAStringSet_Anth_manipulated <- ManipStringSet(DNAStringset_Anth)

Phytree_Anth <- genPhytree(DNAStringSet_Anth_manipulated)

savePhytree(
 phyloTree = Phytree_Anth,
 specimen_dataframe = specdf_Anth,
 tree_file_name = "Anth_phylo_tree.pdf",
 openPDF = FALSE,
 savePDF = FALSE
)

Run the code above in your browser using DataLab