View source: R/data_checking.R
check_object_class | R Documentation |
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")
)
object |
The object to be checked. |
class |
A character vector specifying the class or classes to check against. Default options are "mass_dataset", "tidymass_parameter", "databaseClass", "metIdentifyClass", and "ms2_data". |
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.
None. The function stops execution and throws an error if the object does not belong to the specified class.
Xiaotao Shen shenxt1990@outlook.com
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.