Learn R Programming

EnvNJ (version 0.1.3)

vtree: Build a Tree When Species Are Encoded by n-Dim Vectors

Description

Builds a tree when species are encoded by n-dim vectors.

Usage

vtree(matrix, outgroup = 'any')

Arguments

matrix

either a dataframe or matrix where each column represents an OTU.

outgroup

when a rooted tree is desired, it indicates the species to be used as outgroup.

Value

A list with two objects, the first one is an inter-species distance matrix. The second one is an object of class 'phylo'.

Details

The method is based on a distance matrix obtained after converting the cos between vector (similarity measurement) in a dissimilarity measurement.

See Also

svdgram

Examples

Run this code
# NOT RUN {
data(bovids)
mymatrix <- ngraMatrix(bovids[, 6:11], k = 2)[[2]][, 2:7]
vtree(mymatrix, outgroup = "Pseudoryx_nghetinhensis")
# }

Run the code above in your browser using DataLab