peak-methods: Peak into 'phyloseq' objects

peak-methodsR Documentation

Peak into phyloseq objects

Description

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.

Usage

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 signature 'phyloseq'
peak_abundance(x, nrows = 1:5, ncols = 1:5)

## S4 method for signature 'phyloseq'
peak_taxonomy(x, nrows = 1:5, ncols = 1:5)

## S4 method for signature 'phyloseq'
peak_sample(x, nrows = 1:5, ncols = 1:5)

## S4 method for signature 'ANY'
peak_base(x, nrows = 1:5, ncols = 1:5)

Arguments

x

a phyloseq or data.frame or matrix object

nrows

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.

ncols

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.

Value

Print user specified rows and columns

Examples

data("zackular2014")

peak_abundance(zackular2014, nrows=1:3, ncols = 1:3)

peak_taxonomy(zackular2014, nrows=1:3, ncols = 1:3)

peak_sample(zackular2014, nrows=1:3, ncols = 1:3)

dat.frm <- meta(zackular2014)
# specify specific columns
peak_base(dat.frm, nrows=1:3, ncols = c(1, 3, 4))

matrix_ab <- abundances(zackular2014)
peak_base(matrix_ab, nrows=1:3, ncols = 1:3)


microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.