agglomerated: Create an agglomerated dataframe.

Description Usage Arguments Value

View source: R/metaglomr.R

Description

Creates an agglomerated dataframe from feature counts, sample metadata, and taxonomy annotations.

Usage

1
2
agglomerated(features, samples, taxonomy, sample_col, otu_col = "otu_id",
  count_col = "count")

Arguments

features

a matrix-like object with features as columns and samples as rows

samples

an optional dataframe containing sample metadata, with each sample a separate row

taxonomy

an optional dataframe containing taxonomy information, with each taxa a row and rownames providing taxa id

sample_col

a string giving the name of the column in 'samples' corresponding to the rows in the features table

otu_col

a string giving the desired name of the otu column in the resulting dataframe

count_col

a string giving the desired name of the counts column in the resulting dataframe

Value

A dataframe with each row representing a unique feature+sample+count observation, plus any metadata about the sample and any taxonomic annotation about the feature. This results in a lot of repetition, but is very easy to manipulate with dplyr and the tidyverse.


eclarke/metaglomr documentation built on May 30, 2019, 12:46 p.m.