Learn R Programming

coda4microbiome (version 0.2.4)

logratios_matrix: logratios_matrix

Description

Computes a large matrix with all the log-ratios between pairs of taxa (columns) in the abundance table

Usage

logratios_matrix(x)

Value

list with matrix of log-ratios, matrix indicating the pairs of variables involved in each log-ratio, and a matrix indicating the names of the variables involved in each log-ratio.

Arguments

x

abundance matrix or data frame (rows are samples, columns are variables (taxa))

Author

M. Calle - T. Susin

Examples

Run this code

data(HIV, package = "coda4microbiome")

lrHIV<-logratios_matrix(x_HIV[,(1:4)])

# matrix of log-ratios (first 6 rows and 6 columns):

lrHIV[[1]][1:6,1:6]

# variables involved in each log-ratio

head(lrHIV[[2]])

# names of the variables involved in each log-ratio

head(lrHIV[[3]])

Run the code above in your browser using DataLab