View source: R/nematode_metabolic_footprints.R
NMF | R Documentation |
This function calculates various Nematode Metabolic Footprints (NMF) based on the input data and abundance information. It supports multiple types of NMF calculations and can handle data in different formats (data.frame or matrix).
NMF(data, abundance, type = "All", ...)
## S3 method for class 'data.frame'
NMF(data, abundance, type = "All", ...)
## S3 method for class 'matrix'
NMF(data, abundance, type = "All", ...)
## Default S3 method:
NMF(data, abundance, type = "all", ...)
data |
|
abundance |
|
type |
Character vector specifying the type(s) of NMF to calculate.
|
... |
Additional arguments (currently unused). |
A data.frame containing the calculated NMF values for each sample. The columns represent different NMF types, and the rows correspond to samples.
data <- data.frame(
Cephalobus = c(10, 20, 30),
Eucephalobus = c(5, 10, 12),
Acrobeloides = c(1, 2, 3),
Caenorhabditis = c(5, 8, 15),
Aphelenchus = c(5, 13, 11),
Leptonchus = c(3, 10, 15),
Pratylenchus = c(9, 2, 15),
Tylenchus = c(5, 0, 15),
Mesodorylaimus = c(7, 10, 18),
Discolaimus = c(1, 10, 25),
row.names = c("Sample1", "Sample2", "Sample3")
)
abundance <- data.frame(
Abundance = c(100, 200, 300),
row.names = c("Sample1", "Sample2", "Sample3")
)
result <- NMF(data, abundance, type = "All")
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.