convert_to_long {philr}R Documentation

Converts wide format ILR transformed data to long format

Description

Converts wide format ILR transformed data (see philr) to long format useful in various plotting functions where long format data is required.

Usage

convert_to_long(df, labels)

Arguments

df

PhILR transformed data in wide format (samples by balances) (see philr)

labels

vector (of length nrow(df)) with labels to group samples by

Value

df in long format with columns

Examples

tr <- named_rtree(5)
df <- t(rmultinom(10,100,c(.1,.6,.2,.3,.2))) + 0.65   # add a small pseudocount
colnames(df) <- tr$tip.label

df.philr <- philr(df, tr, part.weights='enorm.x.gm.counts',
      ilr.weights='blw.sqrt', return.all=FALSE)
convert_to_long(df.philr, rep(c('a','b'), 5))

[Package philr version 1.10.0 Index]