Learn R Programming

mclink (version 1.1.1)

convert_abundance_to_presence: Convert Abundance Values to Presence/Absence Indicators

Description

Transforms a numeric abundance matrix into a binary presence/absence matrix, where 1 indicates presence (abundance > 0) and 0 indicates absence. Preserves row names as Orthology_Entry column in the output.

Usage

convert_abundance_to_presence(module_abundance)

Value

A data frame with: - Binary values (1 = present, 0 = absent) for each sample - Original row names preserved in Orthology_Entry column - Same dimensions as input (excluding the Orthology_Entry column)

Arguments

module_abundance

A data frame containing KO abundance data, must include: - Rows named by Orthology_Entry (KO identifiers) - Numeric columns representing sample abundances - An Orthology_Entry column