simple_zero_replacement: Simple Zero Replacement in a Count Matrix

View source: R/1a-propr-backend.R

simple_zero_replacementR Documentation

Simple Zero Replacement in a Count Matrix

Description

This function replaces zeros with the next smallest non-zero value in the input count matrix. If the matrix contains no zeros, it produces an informational message indicating that no replacements were made.

Usage

simple_zero_replacement(ct)

Arguments

ct

A data matrix for which the log-ratio transformation will be performed. It is assumed that the matrix contains numerical values only.

Value

A matrix with zero values replaced by the next smallest non-zero value.

Examples

# Sample input count data with zeros
data <- matrix(c(0, 2, 3, 4, 5, 0), nrow = 2, byrow = TRUE)


tpq/propr documentation built on April 21, 2024, 12:50 p.m.