as.counts: create a 'counts' object

View source: R/io.R

as.countsR Documentation

create a counts object

Description

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

Usage

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

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 Aug. 28, 2023, 5:07 p.m.