View source: R/3-shared-zero.R
simple_zero_replacement | R Documentation |
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.
simple_zero_replacement(ct)
ct |
A data matrix containing numerical values. |
A matrix with zero values replaced by the next smallest non-zero value. If no zeros are found, the function returns the original matrix.
# Sample input count data with zeros
data <- matrix(c(0, 2, 3, 4, 5, 0), nrow = 2, byrow = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.