Learn R Programming

madshapR

Functions to support data cleaning, evaluation, and description, developed for integration with Maelstrom Research software tools. ‘madshapR’ provides functions primarily to evaluate and manipulate datasets and data dictionaries in preparation for data harmonization with the package ‘Rmonize’ and to facilitate integration and transfer between RStudio servers and secure Opal environments. ‘madshapR’ functions can be used independently but are optimized in conjunction with ‘Rmonize’ functions for streamlined and coherent harmonization processing.

Get started

Install the package

# Install madshapR and load the package:
install.packages('madshapR')
library(madshapR)

# If you need help with the package, please use:
madshapR_website()

# Example objects are available here
madshapR_examples

Copy Link

Version

Install

install.packages('madshapR')

Monthly Downloads

247

Version

2.0.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Guillaume Fabre

Last Published

June 27th, 2025

Functions in madshapR (2.0.0)

as_data_dict_mlstr

Validate and coerce any object as an Opal data dictionary format
check_dataset_valueType

Assess a data dictionary and associated dataset for valueType differences
check_data_dict_categories

Assess a data dictionary for potential issues in categories
col_id

Return the id column names(s) of a dataset
bookdown_template

Objects exported from other packages
data_dict_expand

Transform single-row category information to multiple rows as element
data_dict_extract

Generate a data dictionary from a dataset
data_dict_group_split

Split grouped data dictionaries into a named list
data_dict_list_nest

Bind listed data dictionaries
data_dict_update

Update a data dictionary from a dataset
data_dict_ungroup

Ungroup data dictionary
data_dict_pivot_wider

Transform column(s) of a data dictionary from long format to wide format
data_dict_trim_labels

Add shortened labels to data dictionary
dataset_summarize

Generate an assessment report and summary of a dataset
data_extract

Create an empty dataset from a data dictionary
data_dict_filter

Subset data dictionary by row values
dataset_cat_as_labels

Apply data dictionary category labels to the associated dataset variables
check_data_dict_valueType

Assess a data dictionary for non-valid valueType values
data_dict_group_by

Group listed data dictionaries by specified column names
dossier_create

Generate a dossier from a list of one or more datasets
data_dict_collapse

Transform multi-row category column(s) to single rows and join to "Variables"
data_dict_evaluate

Generate an assessment report for a data dictionary
dataset_evaluate

Generate an assessment report for a dataset
is_taxonomy

Test if an object is a valid taxonomy
dataset_zap_data_dict

Remove labels (attributes) from a data frame, leaving its unlabelled columns
is_dossier

Test if an object is a valid dossier (list of dataset(s))
is_data_dict_shape

Test if an object is a workable data dictionary structure
data_dict_apply

Apply a data dictionary to a dataset
dossier_evaluate

Generate an assessment report of a dossier
color_palette_maelstrom

Built-in data frame of colors used in the graphs and charts.
dossier_summarize

Generate an assessment report and summary of a dossier
dataset_preprocess

Generate an evaluation of all variable values in a dataset
first_label_get

Get the first label from a data dictionary
data_dict_match_dataset

Inner join between a dataset and its associated data dictionary
data_dict_pivot_longer

Transform column(s) of a data dictionary from wide format to long format
drop_category

Validate and coerce any object as a non-categorical variable.
madshapR_examples

Built-in material allowing the user to test the package with example data
is_dataset

Test if an object is a valid dataset
dataset_visualize

Generate a web-based visual report for a dataset
typeof_convert_to_valueType

Convert typeof (and class if any) into its corresponding valueType
summary_variables_categorical

Provide descriptive statistics for variables of categorical in a dataset
is_data_dict_mlstr

Test if an object is a valid Maelstrom data dictionary
is_data_dict

Test if an object is a valid data dictionary
valueType_adjust

Attribute the valueType from a data dictionary to a dataset, or vice versa
summary_variables_date

Provide descriptive statistics for variables of type 'date' in a dataset
madshapR_website

Call to online documentation
summary_variables_datetime

Provide descriptive statistics for variables of type 'datetime' in a dataset
summary_variables_numeric

Provide descriptive statistics for variables of type 'numeric' in a dataset
summary_variables_text

Provide descriptive statistics for variables of type 'text' in a dataset
summary_variables

Provide descriptive statistics for variables in a dataset
has_categories

Test if an object has categorical variables.
is_valueType

Test if a character object is one of the valid valueType values
valueType_of

Return the valueType of an object
valueType_list

Built-in data frame of allowed valueType values
is_category

Test and validate if an object is a categorical variable.
valueType_convert_to_typeof

Convert valueType into its corresponding typeof and class in R representation
madshapR-package

madshapR: Functions to Support Data Management and Processing Using the Maelstrom Research Approach
valueType_guess

Guess the first possible valueType of an object (Can be a vector)
valueType_self_adjust

Self-adjust the valueType from a data dictionary or a dataset.
variable_visualize

Generate a list of charts, figures and summary tables of a variable
bookdown_open

Objects exported from other packages
as_data_dict_shape

Validate and coerce any object as a workable data dictionary structure
as_category

Validate and coerce any object as a categorical variable.
as_data_dict

Validate and coerce any object as a data dictionary
check_dataset_categories

Assess a data dictionary and associated dataset for category differences
check_data_dict_variables

Assess a data dictionary for potential issues in variables
check_data_dict_missing_categories

Assess categorical variables for non-Boolean values in 'missing' column
bookdown_render

Objects exported from other packages
as_taxonomy

Validate and coerce any object as a taxonomy
as_valueType

Validate and coerce any object according to a given valueType
check_name_standards

Assess variable names in a data dictionary for non-standard formats
check_dataset_variables

Assess a data dictionary and associated dataset for undeclared variables
as_dataset

Validate and coerce any object as a dataset
as_dossier

Validate and coerce any object as a dossier (list of dataset(s))