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".
check_object_class(
object,
class = c("mass_dataset", "tidymass_parameter", "databaseClass", "metIdentifyClass",
"ms2_data")
)
None. The function stops execution and throws an error if the object does not belong to the specified class.
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.
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")