dataset_preprocess: Generate an evaluation of all variable values in a dataset

dataset_preprocessR Documentation

Generate an evaluation of all variable values in a dataset

Description

Analyses the content of a dataset and its data dictionary (if any), identifies variable(s) data type and values accordingly and preprocess the variables. The elements of the data frame generated are evaluation of valid/non valid/missing values (based on the data dictionary information if provided). This function can be used to personalize report parameters and is internally used in the function dataset_summarize().

Generates a data frame that evaluates and aggregates all columns in a dataset with (if any) its data dictionary. The data dictionary (if present) separates observations between open values, missing values, categorical values , and categorical missing values (which corresponds to the 'missing' column in the 'Categories' sheet). This internal function is mainly used inside summary functions.

Usage

dataset_preprocess(dataset, data_dict = NULL)

Arguments

dataset

A dataset object.

data_dict

A list of data frame(s) representing metadata of the input dataset. Automatically generated if not provided.

Details

A data dictionary contains the list of variables in a dataset and metadata about the variables and can be associated with a dataset. A data dictionary object is a list of data frame(s) named 'Variables' (required) and 'Categories' (if any). To be usable in any function, the data frame 'Variables' must contain at least the name column, with all unique and non-missing entries, and the data frame 'Categories' must contain at least the variable and name columns, with unique combination of variable and name.

A dataset is a data table containing variables. A dataset object is a data frame and can be associated with a data dictionary. If no data dictionary is provided with a dataset, a minimum workable data dictionary will be generated as needed within relevant functions. Identifier variable(s) for indexing can be specified by the user. The id values must be non-missing and will be used in functions that require it. If no identifier variable is specified, indexing is handled automatically by the function.

Value

A data frame providing summary elements of a dataset, including its values and data dictionary elements.

See Also

summary_variables()

Examples

{
 
###### Example : Any data frame can be a dataset by definition.
head(dataset_preprocess(dataset = iris))

}


madshapR documentation built on May 29, 2024, 7:43 a.m.