Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 class 'phyDat'
WriteTntCharacters(
  dataset,
  filepath = NULL,
  comment = "Dataset written by `TreeTools::WriteTntCharacters()`",
  types = NULL,
  pre = "",
  post = ""
)

## S3 method for class '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=).

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

See Also

Examples

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')

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.