is_dataschema {Rmonize}R Documentation

Test for a valid DataSchema object

Description

Tests if the input is a valid DataSchema 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.

Usage

is_dataschema(object)

Arguments

object

A potential DataSchema object to be evaluated.

Details

A DataSchema is the list of core variables to generate across datasets and related metadata. A DataSchema object is a list of data frames with elements named 'Variables' (required) and 'Categories' (if any). The 'Variables' element must contain at least the name column, and the 'Categories' element must contain at least the variable and name columns to be usable in any function. In 'Variables' the name column must also have unique entries, and in 'Categories' the combination of variable and name columns must also be unique.

Value

A logical.

See Also

For a better assessment, please use dataschema_evaluate().

Examples

{

# use Rmonize_DEMO provided by the package

dataschema <- Rmonize_DEMO$`dataschema - final`
is_dataschema(dataschema)
is_dataschema(iris)

}


[Package Rmonize version 1.1.0 Index]