harmonized_dossier_evaluate {Rmonize}R Documentation

Generate an assessment report for a harmonized dossier

Description

Assesses the content and structure of a harmonized dossier and generates reports of the results. This function can be used to evaluate data structure, presence of specific fields, coherence across elements, and data dictionary formats.

Usage

harmonized_dossier_evaluate(
  harmonized_dossier,
  dataschema = attributes(harmonized_dossier)$`Rmonize::DataSchema`,
  taxonomy = NULL,
  as_dataschema_mlstr = TRUE
)

Arguments

harmonized_dossier

A list containing the harmonized dataset(s).

dataschema

A DataSchema object.

taxonomy

An optional data frame identifying a variable classification schema.

as_dataschema_mlstr

Whether the output DataSchema should be coerced with specific format restrictions for compatibility with other Maelstrom Research software. TRUE by default.

Details

A harmonized dossier is a named list containing one or more data frames, which are harmonized datasets. A harmonized dossier is generally the product of applying processing to a dossier object The name of each harmonized dataset (data frame) is taken from the reference input dataset. A harmonized dossier also contains the DataSchema and Data Processing Elements used in processing as attributes.

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.

A taxonomy is a classification schema that can be defined for variable attributes. A taxonomy is usually extracted from an Opal environment, and a taxonomy object is a data frame that must contain at least the columns taxonomy, vocabulary, and terms. Additional details about Opal taxonomies are available online.

The object may be specifically formatted to be compatible with additional Maelstrom Research software, in particular Opal environments.

Value

A list of data frames containing assessment reports for each harmonized dataset.

Examples

{

#' # use Rmonize_DEMO provided by the package
library(dplyr)

glimpse(harmonized_dossier_evaluate(Rmonize_DEMO$harmonized_dossier))

}


[Package Rmonize version 1.1.0 Index]