Tests if the input is a valid Data Processing Elements object. This function mainly helps validate input within other functions of the package but could be used to check if an object is valid for use in a function.

is_data_proc_elem(object)

Arguments

object

A potential Data Processing Elements object to be evaluated.

Value

A logical.

Details

The Data Processing Elements specifies the input elements and processing algorithms to generate harmonized variables in the DataSchema formats. It is also contains metadata used to generate documentation of the processing. A Data Processing Elements object is a data frame with specific columns used in data processing: dataschema_variable, input_dataset, input_variables, Mlstr_harmo::rule_category and Mlstr_harmo::algorithm. To initiate processing, the first entry must be the creation of a harmonized primary identifier variable (e.g., participant unique ID).

Examples

{

# Use Rmonize_examples to run examples.

is_data_proc_elem(Rmonize_examples$`Data_Processing_Element_no errors`)
is_data_proc_elem(Rmonize_examples$`DataSchema`)
is_data_proc_elem(iris)
}
#> [1] FALSE