knitr::opts_chunk$set(echo = TRUE)
Miscellaneous Helper Functions For The Univ. Regensburg Tinnitus Data.
Important: For most of the functions to work, you would need to put into the data-raw/
folder the original dataset (200622_uhreg.xlsx
) which cannot be uploaded to GitHub due to copyright reasons.
data-raw/uhreg.R
: preprocessing script for the raw UHREG datauhreg
and data_dict
(+ json export at inst/extdata/data_dict.json
)discretize_score()
for discretizing a numeric questionnaire score according to predefined cutoff values from literature.remotes::install_github("unmnn/uhregmisc")
library(uhregmisc)
knitr::include_graphics(file.path("app-ume", "app-ume.png"))
Provides an overview of missing data patterns. You can specify a data subset based on:
Additionally, you can choose to order questionnaires (y-axis) either by mutual missingness (determined by a hierarchical clustering) or just alphabetically by their name.
# When running the first time, create the necessary pre-processed dataset with: source("app-ume/ume_prep-data.R") # Afterwards, the folder `app-ume` should contain the file `data.rds`. # Then, just run the app via: shiny::runApp("app-ume")
The script data-raw/uhreg.R
preprocesses the UHREG data.
TQ_q01
→ TQ
questionnaire.META
TSCHQ_q36_1_otologic_additional
instead of TSCHQ_q361_otologic_additional
q
instead of question
, lvs
instead of last_validation_status
TBF12_q10
instead of TBF12_question10
TBF12_q01
instead of TBF12_q1
(there is also a TBF12_q10
)TSCHQ_q02_sex
to factor
.META_patient_id
to character
.META_visit_day
, TSCHQ_q05_begin_tinnitus
to date
-1
values are replaced with NA_integer_
where appropriate109 unique treatment pathways S S-B-FV-FU 869 38 FV-B S-B-FV 32 24 B-FV S-S 22 17 B-FV-I-I-I-S B-FV-FU-FU-FU 16 15
uhreg
and data_dict
data_dict
library(dplyr) library(purrr) data_dict var <- "TSCHQ_q09_perception" data_dict %>% filter(variable == var) %>% pull(description) data_dict %>% filter(variable == var) %>% pluck("value", 1)
uhreg
overviewskimr::skim_without_charts(uhreg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.