nexml_write: Write nexml files

View source: R/nexml_write.R

nexml_writeR Documentation

Write nexml files

Description

Write nexml files

Usage

nexml_write(
  x = nexml(),
  file = NULL,
  trees = NULL,
  characters = NULL,
  meta = NULL,
  ...
)

Arguments

x

a nexml object, or any phylogeny object (e.g. phylo, phylo4) that can be coerced into one. Can also be omitted, in which case a new nexml object will be constructed with the additional parameters specified.

file

the name of the file to write out

trees

phylogenetic trees to add to the nexml file (if not already given in x) see add_trees for details.

characters

additional characters

meta

A meta element or list of meta elements, see add_meta

...

additional arguments to add__basic_meta, such as the title. See add_basic_meta.

Value

Writes out a nexml file

See Also

add_trees add_characters add_meta nexml_read

Examples

 ## Write an ape tree to nexml, analgous to write.nexus:
 library(ape); data(bird.orders)
 ex <- tempfile(fileext=".xml")
 write.nexml(bird.orders, file=ex)

ropensci/RNeXML documentation built on Jan. 14, 2023, 4:36 a.m.