This function checks if the provided object belongs to a specified class. It supports multiple classes including "mass_dataset", "tidymass_parameter", "databaseClass", "metIdentifyClass", and "ms2_data".
Usage
check_object_class(
object,
class = c("mass_dataset", "tidymass_parameter", "databaseClass", "metIdentifyClass",
"ms2_data")
)Value
None. The function stops execution and throws an error if the object does not belong to the specified class.
Details
The function uses the is function to check if the object belongs to the specified class. If the object does not belong to the class, the function stops and returns an error message.
Author
Xiaotao Shen xiaotao.shen@outlook.com
Examples
data("expression_data")
data("sample_info")
data("variable_info")
object =
create_mass_dataset(
expression_data = expression_data,
sample_info = sample_info,
variable_info = variable_info
)
check_object_class(object, "mass_dataset")
