This page provides introductory texts on the creation of data quality reports using R.

As shown in the picture below, creating reports requires, the appropriate setup of study data and metadata. An example is provided within the advanced report section.

Quick report

The first option is to use the dq_report() function which requires only two objects to create a default report:

dq_report(study_data, meta_data)

In addition to this command only a few further lines of code are necessary to load the respective data into the working environment. The illustration below shows how sparse a respective R file can be (left upper panel of R-Studio):

You can open a reduced example report generated by dq_report() here

The code shown in the illustration is given here:

# --------------------------------------------------------------------------------------------------
# D A T A    Q U A L I T Y   I N    E P I D E M I O L O G I C A L    R E S E R A C H
#
# == dataquieR
#
# dq_report() eases the generation of data quality reports as it calls automatically functions of
# dataquieR
#
# Installation/Further Information -----------------------------------------------------------------
#
# Please see our website:
# https://dataquality.ship-med.uni-greifswald.de/
#
# install from CRAN using

install.packages("dataquieR")

# Alternatively, you may install the development version as described
# on https://dataquality.ship-med.uni-greifswald.de/DownloadR.html

# load the package

library(dataquieR)

# data ---------------------------------------------------------------------------------------------

# Study of Health in Pomerania

sd1 <- readRDS(system.file("extdata", "ship.RDS", package = "dataquieR"))

summary(sd1)

# Metadata

md1 <- readRDS(system.file("extdata", "ship_meta.RDS", package = "dataquieR"))


# dq_report() - a crude approach -------------------------------------------------------------------

my_dq_report <- dq_report(study_data = sd1,
                          meta_data  = md1,
                          label_col  = LABEL)

# check the results

my_dq_report

Of course, the function dq_report() can manage further arguments and settings. However, to gain insides into the data this sparse version is a good start and may serve as the fundament to tailor more specific reports.