Learn R Programming

HMPTrees (version 1.4)

createTrees: Create a Tree Object

Description

This function creates a list tree objects of type 'phylo' for use in plotting the trees.

Usage

createTrees(data, samples = NULL, level = "genus", split = ".")

Arguments

data

A data frame in which each column contains the rdp read counts for every taxa given in the row names.

samples

Deprecated. Only send the columns in data to create.

level

The depth the tree creation will go down to (kingdom, phylum, class, order, family, genus, species, subspecies).

split

This is the character that separates the taxa levels in the row names.

Value

A list of 'phylo' objects that can be passed to plotTree to plot them.

Details

For 'level' k, p, c, o, f, g, s and ss can be used in place of kingdom, phylum, class, order, family, genus, species and subspecies respectively.

Examples

Run this code
	data(saliva)
	
	### Creates a tree for the 4th sample in 'Saliva'
	salivaTree <- createTrees(saliva[,4, drop=FALSE])

Run the code above in your browser using DataLab