calc_binary: Calculate presence/absence.

View source: R/CALC-calc_binary.R

calc_binaryR Documentation

Calculate presence/absence.

Description

Calculate the presence/absence of data in certain pathway.

Usage

calc_binary (tibble_ko, y_axis, data_experiment = NULL, binary = TRUE,
metabolism = FALSE)

Arguments

tibble_ko

a tibble object from mapping_ko.

y_axis

a character, indicating the pathway to analyze.

data_experiment

optional. a data frame object containing metadata information.

binary

optional. a logical value, indicating whether you want to calculate presence/absence or abundance of KOs per pathway.

metabolism

optional. a logical value, if TRUE it will show the metabolism table.

Details

This function calculates the presence or absence of a pathway by counting the number of times it appears (or not) in the dataset.

Value

A data frame containing the presence/absence (1/0) of each pathway within each bin_name. calc_binary(ko_bin_mapp, Pathway)

Examples

# calc_binary (ko_bin_mapp, Pathway, binary = T, metabolism = T)

mirnavazquez/RbiMs documentation built on April 17, 2025, 7:37 p.m.