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 algorithms used to process input variables into harmonized variables in the DataSchema format. 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_DEMO provided by the package

data_proc_elem <- Rmonize_DEMO$`data_processing_elements - final`
is_data_proc_elem(data_proc_elem)
is_data_proc_elem(iris)

}
#> [1] FALSE