Learn R Programming

HMPTrees (version 1.4)

formatData: Formats a Data Set

Description

This function will take a data set and format it by removing low count trees, and/or normalizing counts.

Usage

formatData(data, countThreshold = 1000, normalizeThreshold = 10000)

Arguments

data

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

countThreshold

A cut off threshold for reads - all trees with fewer than this number of reads will be removed.

normalizeThreshold

All the trees that are not removed will be normalized to this many reads.

Value

A new data set that is trimmed and standardized based on the specified parameters. The new data is also reordered alphabetically according to row labels.

Details

When removing trees with too few reads, the cuts off is based on the value of the top level node, not the sum of all the reads in a sample.

Examples

Run this code
	data(saliva)
	
	saliva2 <- formatData(saliva, 1000, 10000)

Run the code above in your browser using DataLab