TreeTools (version 1.4.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()`",
  types = NULL,
  pre = "",
  post = ""
)

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

# S3 method for matrix WriteTntCharacters( dataset, filepath = NULL, comment = "Dataset written by `TreeTools::WriteTntCharacters()`", types = NULL, 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.

types

Optional list specifying where different data types begin. c(num = 1, dna = 10) sets characters 1..9 as numeric, 10..end as DNA.

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