load.trees: Read Newick trees from a set of files.

Description Usage Arguments Details Value Author(s)

Description

Read a set of files containing individual trees and return a multiPhylo object with all trees in the files. The set of files to be read can either be passed explicitly as a character vector, or through a combination of a set of directories and a file extension which is used to construct a wildcard expression which will match files with the extension you specify..

Usage

1
load.trees(paths, extension = ".tre", use.file.names = TRUE)

Arguments

paths

If estension is NULL, a list of files containing trees. Otherwise, the prefix for a wildcard expression.

extension

If NULL, the paths are passed unaltered to read.tree. Otherwise, a suffix (file extension) for the wildcard expression.

use.file.names

Set the tree names using the file names. Will only work properly if each file contains a single tree.

Details

The behavior is determined by the extension parameter: If it is NULL, then the paths supplied are passed unaltered to the ape::read.tree function. If the parameter is not null, then the paths are altered by calling Sys.glob with wildcard expression "paths*extension".

Value

A multiPhylo object.

Author(s)

Grady Weyenberg


grady/kdetrees documentation built on May 17, 2019, 8:01 a.m.