
Activate a Specific Component of a Microbiome Dataset
Source:R/class_microbiome_dataset.R
activate_microbiome_dataset.RdThis function sets a specific component of a microbiome dataset object as active. It allows the user to specify which part of the dataset to work with.
Usage
activate_microbiome_dataset(
.data,
what = c("sample_info", "variable_info", "expression_data")
)Details
The function uses the slot function to assign the active component to
the 'activated' slot of the microbiome dataset object. This makes it easier to
work with specific parts of the dataset in subsequent analyses.
Note
It's essential to ensure that the microbiome dataset object has the necessary structure and slots to use this function effectively.
Author
Xiaotao Shen xiaotao.shen@outlook.com
Examples
data("global_patterns", package = "microbiomedataset")
x <- activate_microbiome_dataset(global_patterns, what = "sample_info")
x@activated
#> [1] "sample_info"