barp.table: Barplot Table

View source: R/barp.table.r

barp.tableR Documentation

Barplot Table

Description

Creates a table that can be used for a barplot graph

Usage

barp.table(x, by, fun, ...)

Arguments

x

The community table with Taxon reads counts

by

Aggregating vector of classes

fun

Function used to aggregate. Default is sum.

Details

This is a wrapper function to 'aggregate' and 'apply'. It takes a Taxon table (OTU or ASV table) and counts the number of reads aggregating by the vector specified by 'by' using function specified with 'fun'

Value

An object of class barp_table A matrix with Taxa and aggregate values. The object has plot method, which will produce barplots For absolute and relative number of reads and absolute and relative number of OTUs/ASV per Taxon

Author(s)

Pedro Martinez Arbizu

See Also

plot.barp_table

Examples

bp1 <- barp.table(deepMeio[,9:27],deepMeio$Group,sum)
colmeio <- pal2table( c(rownames(bp1$table),'Branchiopoda','Calanoida','Cyclopoida','Harpacticoida','Isopoda','Misophrioida','Ostracoda','Siphonostomatoida','Tanaidacea','Tantulocarida'),pal='c25bro2')
plot(bp1,pal2table=colmeio)



pmartinezarbizu/dada2pp documentation built on Feb. 7, 2024, 7:01 a.m.