is_compositional {microbiome} | R Documentation

## Test Compositionality

### Description

Test if phyloseq object is compositional.

### Usage

    is_compositional(x, tolerance = 1e-06)

### Arguments

`x` | `phyloseq-class` object
`tolerance` | Tolerance for detecting compositionality.

### Details

This function tests that the sum of abundances within each sample is almost zero, within the tolerance of 1e-6 by default.

### Value

Logical TRUE/FALSE

### See Also

transform

### Examples

    data(dietswap)
    a <- is_compositional(dietswap)
    b <- is_compositional(transform(dietswap, "identity"))
    c <- is_compositional(transform(dietswap, "compositional"))

[Package microbiome version 1.14.0 Index]