powered by
counts
Convert an object of class matrix or data.frame to an object of class counts
matrix
data.frame
as.counts(x, method = "chisq", colmap = "rainbow")
an object of class counts
an object of class matrix or data.frame
either "chisq" (for the chi-square distance) or "bray" (for the Bray-Curtis distance)
"chisq"
"bray"
the colour map to be used in pie charts.
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)
Run the code above in your browser using DataLab