These functions work on otu_table
, tax_table
, sample_data
or on data.frame
and matrix
.
peak_abundance
returns, user specified number of rows and columns
for otu_table
.
#' peak_taxonomy
returns, user specified number of rows and columns
for tax_table
.
peak_sample
returns, user specified number of rows and columns
for sample_data
.
peak_base
returns, user specified number of rows and columns
for data.frame
and matrix
.
peak_abundance(x, nrows = 1:5, ncols = 1:5)
peak_taxonomy(x, nrows = 1:5, ncols = 1:5)
peak_sample(x, nrows = 1:5, ncols = 1:5)
peak_base(x, nrows = 1:5, ncols = 1:5)
# S4 method for phyloseq
peak_abundance(x, nrows = 1:5, ncols = 1:5)
# S4 method for phyloseq
peak_taxonomy(x, nrows = 1:5, ncols = 1:5)
# S4 method for phyloseq
peak_sample(x, nrows = 1:5, ncols = 1:5)
# S4 method for ANY
peak_base(x, nrows = 1:5, ncols = 1:5)
a
phyloseq
or data.frame
or
matrix
object
number of rows, to be specified as numeric e.g. 1, or sequence of numeric specified as 1:5. to return first to fifth row.
number of cols, to be specified as numeric e.g. 1, or sequence of numeric specified as 1:5 to return first to fifth col.
Print user specified rows and columns
data("zackular2014")
peak_abundance(zackular2014, nrows=1:3, ncols = 1:3)
#> Adenoma10-2757 Adenoma11-2775 Adenoma13-2803
#> d__denovo1773 0 0 0
#> d__denovo1771 0 0 0
#> d__denovo1776 0 0 3
peak_taxonomy(zackular2014, nrows=1:3, ncols = 1:3)
#> Taxonomy Table: [3 taxa by 3 taxonomic ranks]:
#> Domain Phylum Class
#> d__denovo1773 "k__Bacteria" "p__Bacteroidetes" "c__Bacteroidia"
#> d__denovo1771 "k__Bacteria" "p__Bacteroidetes" "c__Bacteroidia"
#> d__denovo1776 "k__Bacteria" "p__Firmicutes" "c__Clostridia"
peak_sample(zackular2014, nrows=1:3, ncols = 1:3)
#> investigation_type
#> Adenoma10-2757 metagenomic
#> Adenoma11-2775 metagenomic
#> Adenoma13-2803 metagenomic
#> project_name
#> Adenoma10-2757 The Gut Microbiome Improves Predictive Models for Diagnosis of Colorectal Cancer
#> Adenoma11-2775 The Gut Microbiome Improves Predictive Models for Diagnosis of Colorectal Cancer
#> Adenoma13-2803 The Gut Microbiome Improves Predictive Models for Diagnosis of Colorectal Cancer
#> DiseaseState
#> Adenoma10-2757 nonCRC
#> Adenoma11-2775 nonCRC
#> Adenoma13-2803 nonCRC
dat.frm <- meta(zackular2014)
# specify specific columns
peak_base(dat.frm, nrows=1:3, ncols = c(1, 3, 4))
#> investigation_type DiseaseState age
#> Adenoma10-2757 metagenomic nonCRC 37
#> Adenoma11-2775 metagenomic nonCRC 65
#> Adenoma13-2803 metagenomic nonCRC 62
matrix_ab <- abundances(zackular2014)
peak_base(matrix_ab, nrows=1:3, ncols = 1:3)
#> Adenoma10-2757 Adenoma11-2775 Adenoma13-2803
#> d__denovo1773 0 0 0
#> d__denovo1771 0 0 0
#> d__denovo1776 0 0 3