Learn R Programming

TreeTools (version 1.3.1)

WriteTntCharacters: Write morphological character matrix to TNT file

Description

Write morphological character matrix to TNT file

Usage

WriteTntCharacters(
  dataset,
  filepath = NULL,
  comment = "Dataset written by `TreeTools::WriteTntCharacters()`",
  pre = "",
  post = ""
)

# S3 method for phyDat WriteTntCharacters( dataset, filepath = NULL, comment = "Dataset written by `TreeTools::WriteTntCharacters()`", pre = "", post = "" )

# S3 method for matrix WriteTntCharacters( dataset, filepath = NULL, comment = "Dataset written by `TreeTools::WriteTntCharacters()`", pre = "", post = "" )

Arguments

dataset

Morphological dataset of class phyDat or matrix.

filepath

Path to file; if NULL, returns a character vector.

comment

Optional comment with which to entitle matrix.

pre, post

Character vector listing text to print before and after the character matrix. Specify pre = 'piwe=; if the matrix is to be analysed using extended implied weighting (xpiwe=).

See Also

ReadTntCharacters()

Examples

Run this code
# NOT RUN {
data('Lobo', package = 'TreeTools')

WriteTntCharacters(Lobo.phy)

# Read with extended implied weighting
WriteTntCharacters(Lobo.phy, pre = 'piwe=10;', post = 'xpiwe=;')

# Write to a file with:
# WriteTntCharacters(Lobo.phy, 'example_file.tnt')
# }

Run the code above in your browser using DataLab