as.counts: create a 'counts' object

Description Usage Arguments Value Examples

View source: R/io.R

Description

Convert an object of class matrix or data.frame to an object of class counts

Usage

1
as.counts(x, method = "chisq", colmap = "rainbow")

Arguments

x

an object of class matrix or data.frame

method

either "chisq" (for the chi-square distance) or "bray" (for the Bray-Curtis distance)

colmap

the colour map to be used in pie charts.

Value

an object of class counts

Examples

1
2
3
4
5
X <- matrix(c(0,100,0,30,11,2,94,36,0),nrow=3,ncol=3)
rownames(X) <- 1:3
colnames(X) <- c('a','b','c')
comp <- as.counts(X)
d <- diss(comp)

provenance documentation built on May 5, 2021, 1:06 a.m.