Compare commits

..

No commits in common. "2a580965e3b829ea0be23a99ef526fa06d67f8b7" and "af523edc0080ff0f0822168235a1fdcd3a232520" have entirely different histories.

27 changed files with 796 additions and 1521 deletions

View file

@ -8,7 +8,7 @@ message: 'To cite package "FreesearchR" in publications use:'
type: software
license: AGPL-3.0-or-later
title: 'FreesearchR: Easy data analysis for clinicians'
version: 25.12.5
version: 25.12.3
doi: 10.5281/zenodo.14527429
identifiers:
- type: url
@ -1116,30 +1116,6 @@ references:
orcid: https://orcid.org/0000-0002-0172-3812
year: '2025'
doi: 10.32614/CRAN.package.data.table
- type: software
title: viridis
abstract: 'viridis: Colorblind-Friendly Color Maps for R'
notes: Imports
url: https://sjmgarnier.github.io/viridis/
repository: https://CRAN.R-project.org/package=viridis
authors:
- family-names: Garnier
given-names: Simon
email: garnier@njit.edu
year: '2025'
doi: 10.32614/CRAN.package.viridis
- type: software
title: smd
abstract: 'smd: Compute Standardized Mean Differences'
notes: Imports
url: https://bsaul.github.io/smd/
repository: https://CRAN.R-project.org/package=smd
authors:
- family-names: Saul
given-names: Bradley
email: bradleysaul@fastmail.com
year: '2025'
doi: 10.32614/CRAN.package.smd
- type: software
title: styler
abstract: 'styler: Non-Invasive Pretty Printing of R Code'

View file

@ -1,6 +1,6 @@
Package: FreesearchR
Title: Easy data analysis for clinicians
Version: 25.12.5
Version: 25.12.3
Authors@R: c(
person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154")),
@ -69,9 +69,7 @@ Imports:
NHANES,
shiny.i18n,
stRoke,
data.table,
viridis,
smd
data.table
Suggests:
styler,
devtools,

View file

@ -1,11 +1,3 @@
# FreesearchR 25.12.5
*NEW* Added option to add pairwise differences in discriptive table.
# FreesearchR 25.12.4
Republish 25.12.3
# FreesearchR 25.12.3
*NEW* Extended missingness evaluation to include two different approaches. Docs will catch up and video tutorials are coming.

View file

@ -1 +1 @@
app_version <- function()'25.12.5'
app_version <- function()'25.12.3'

View file

@ -37,7 +37,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
#'
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
theme <- match.arg(theme)
detail_level <- match.arg(detail_level)
@ -100,10 +100,6 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, ad
gtsummary::add_p() |>
gtsummary::bold_p()
}
if (isTRUE(add.diff)) {
out <- out |>
gtsummary::add_difference()
}
}
out

View file

@ -1 +1 @@
hosted_version <- function()'v25.12.5-251211'
hosted_version <- function()'v25.12.3-251211'

View file

@ -75,15 +75,15 @@ data_missings_server <- function(id,
shiny::req(data())
vectorSelectInput(
inputId = ns("missings_method"),
label = i18n$t("Analysis method for missingness overview"),
label = i18n$t("Select missings analysis to apply"),
choices = setNames(
c(
"predictors",
"outcome"
),
c(
i18n$t("Overview of missings across variables"),
i18n$t("Overview of difference in variables by missing status in outcome")
i18n$t("Variables"),
i18n$t("By outcome")
)
)
)
@ -96,19 +96,15 @@ data_missings_server <- function(id,
shiny::req(input$missings_method)
# browser()
if (input$missings_method == "predictors") {
label <- i18n$t("Select a variable for grouped overview")
df <- data_type_filter(data(), type = c("categorical", "dichotomous"))
col_subset <- c("none", names(df))
} else {
label <- i18n$t("Select outcome variable for overview")
df <- datar()[apply(datar(), 2, anyNA)]
col_subset <- names(df)
}
columnSelectInput(
inputId = ns("missings_var"),
label = label,
label = i18n$t("Select variable to stratify analysis"),
data = df,
col_subset = col_subset,
col_subset = c("none", names(df)),
none_label = i18n$t("No variable")
)
})
@ -148,11 +144,7 @@ data_missings_server <- function(id,
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
# tbl <- rv$data()
if (anyNA(datar())) {
if (input$missings_method == "predictors") {
title <- i18n$t("Overview of missing observations")
} else {
title <- i18n$t("No outcome measure chosen")
}
title <- i18n$t("No variable chosen for analysis")
} else {
title <- i18n$t("No missing observations")
}

Binary file not shown.

View file

@ -400,20 +400,10 @@ ui_elements <- function(selection) {
"Yes" = "yes"
)
),
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
shiny::br(),
shiny::radioButtons(
inputId = "add_diff",
label = i18n$t("Include group differences"),
selected = "no",
inline = TRUE,
choices = list(
"No" = "no",
"Yes" = "yes"
)
)
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
),
shiny::br(),
shiny::br(),
shiny::actionButton(
inputId = "act_eval",
label = i18n$t("Evaluate"),

View file

@ -335,7 +335,7 @@ validation_lib <- function(name = NULL) {
"mcar" = function(x, y) {
### Placeholder for missingness validation
list(
string = i18n$t("There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."),
string = i18n$t("There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."),
summary.fun = mcar_validate,
summary.fun.args = list(
data = x,

View file

@ -15,7 +15,7 @@
|rstudio |2025.09.2+418 Cucumberleaf Sunflower (desktop) |
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|quarto |1.7.30 @ /usr/local/bin/quarto |
|FreesearchR |25.12.5.251211 |
|FreesearchR |25.12.3.251211 |
--------------------------------------------------------------------------------
@ -83,7 +83,7 @@
|foreach |1.5.2 |2022-02-02 |CRAN (R 4.4.0) |
|foreign |0.8-90 |2025-03-31 |CRAN (R 4.4.1) |
|Formula |1.2-5 |2023-02-24 |CRAN (R 4.4.1) |
|FreesearchR |25.12.5 |NA |NA |
|FreesearchR |25.12.3 |NA |NA |
|fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) |
|gdtools |0.4.4 |2025-10-06 |CRAN (R 4.4.1) |
|generics |0.1.4 |2025-05-09 |CRAN (R 4.4.1) |
@ -114,6 +114,7 @@
|KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.4.1) |
|keyring |1.4.1 |2025-06-15 |CRAN (R 4.4.1) |
|knitr |1.50 |2025-03-16 |CRAN (R 4.4.1) |
|labeling |0.4.3 |2023-08-29 |CRAN (R 4.4.1) |
|later |1.4.4 |2025-08-27 |CRAN (R 4.4.1) |
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.4.1) |
|lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) |
@ -157,6 +158,10 @@
|qqconf |1.3.2 |2023-04-14 |CRAN (R 4.4.0) |
|qqplotr |0.0.7 |2025-09-05 |CRAN (R 4.4.1) |
|quarto |1.5.1 |2025-09-04 |CRAN (R 4.4.1) |
|R.cache |0.17.0 |2025-05-02 |CRAN (R 4.4.1) |
|R.methodsS3 |1.8.2 |2022-06-13 |CRAN (R 4.4.1) |
|R.oo |1.27.1 |2025-05-02 |CRAN (R 4.4.1) |
|R.utils |2.13.0 |2025-02-24 |CRAN (R 4.4.1) |
|R6 |2.6.1 |2025-02-15 |CRAN (R 4.4.1) |
|ragg |1.5.0 |2025-09-02 |CRAN (R 4.4.1) |
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.4.0) |
@ -196,10 +201,11 @@
|shinyjs |2.1.0 |2021-12-23 |CRAN (R 4.4.0) |
|shinyTime |1.0.3 |2022-08-19 |CRAN (R 4.4.0) |
|shinyWidgets |0.9.0 |2025-02-21 |CRAN (R 4.4.1) |
|smd |0.8.0 |2025-02-12 |CRAN (R 4.4.1) |
|sourcetools |0.1.7-1 |2023-02-01 |CRAN (R 4.4.1) |
|stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) |
|stringr |1.6.0 |2025-11-04 |CRAN (R 4.4.1) |
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) |
|styler |1.11.0 |2025-10-13 |CRAN (R 4.4.1) |
|systemfonts |1.3.1 |2025-10-01 |CRAN (R 4.4.1) |
|testthat |3.3.1 |2025-11-25 |CRAN (R 4.4.3) |
|textshaping |1.0.4 |2025-10-10 |CRAN (R 4.4.1) |
@ -213,10 +219,9 @@
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.4.1) |
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) |
|usethis |3.2.1 |2025-09-06 |CRAN (R 4.4.1) |
|utf8 |1.2.6 |2025-06-08 |CRAN (R 4.4.1) |
|uuid |1.2-1 |2024-07-29 |CRAN (R 4.4.1) |
|vctrs |0.6.5 |2023-12-01 |CRAN (R 4.4.0) |
|viridis |0.6.5 |2024-01-29 |CRAN (R 4.4.0) |
|viridisLite |0.4.2 |2023-05-02 |CRAN (R 4.4.1) |
|vroom |1.6.7 |2025-11-28 |CRAN (R 4.4.3) |
|withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) |
|writexl |1.5.4 |2025-04-15 |CRAN (R 4.4.1) |

View file

@ -1,7 +1,7 @@
########
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpftDBtp/file7bf3239dee0a.R
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpejDCIE/filec7542b7ed14.R
########
i18n_path <- here::here("translations")
@ -49,7 +49,6 @@ library(shiny.i18n)
## Translation init
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
# i18n <- shiny.i18n::Translator$new(translation_csvs_path = here::here("inst/translations/"))
i18n$set_translation_language("en")
@ -63,7 +62,7 @@ i18n$set_translation_language("en")
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
########
app_version <- function()'25.12.5'
app_version <- function()'25.12.2'
########
@ -109,7 +108,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
#'
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
theme <- match.arg(theme)
detail_level <- match.arg(detail_level)
@ -172,10 +171,6 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, ad
gtsummary::add_p() |>
gtsummary::bold_p()
}
if (isTRUE(add.diff)) {
out <- out |>
gtsummary::add_difference()
}
}
out
@ -861,18 +856,8 @@ make_choices_with_infos <- function(data) {
#' @importFrom shiny selectizeInput
#' @export
#'
columnSelectInput <- function(
inputId,
label,
data,
selected = "",
...,
col_subset = NULL,
placeholder = "",
onInitialize,
none_label = "No variable selected",
maxItems = NULL
) {
columnSelectInput <- function(inputId, label, data, selected = "", ...,
col_subset = NULL, placeholder = "", onInitialize, none_label="No variable selected",maxItems=NULL) {
datar <- if (is.reactive(data)) data else reactive(data)
col_subsetr <- if (is.reactive(col_subset)) col_subset else reactive(col_subset)
@ -1037,6 +1022,8 @@ vectorSelectInput <- function(inputId,
}
########
#### Current file: /Users/au301842/FreesearchR/R//cut_var.R
########
@ -2675,7 +2662,7 @@ create_plot <- function(data, type, pri, sec, ter = NULL, ...) {
out
}
#' Print label, and if missing print variable name for plots
#' Print label, and if missing print variable name
#'
#' @param data vector or data frame
#' @param var variable name. Optional.
@ -4442,7 +4429,7 @@ data_types <- function() {
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
########
hosted_version <- function()'v25.12.5-251211'
hosted_version <- function()'v25.12.2-251203'
########
@ -5534,46 +5521,18 @@ launch_FreesearchR <- function(...){
#' Data correlations evaluation module
#'
#' @param id Module id
#' @param ... additional UI elements to show before the table overview
#'
#' @name data-missings
#' @returns Shiny ui module
#' @export
data_missings_ui <- function(id, ...) {
data_missings_ui <- function(id) {
ns <- shiny::NS(id)
list(
bslib::layout_sidebar(
sidebar = bslib::sidebar(
bslib::accordion(
id = ns("acc_mis"),
open = "acc_chars",
multiple = FALSE,
bslib::accordion_panel(
value = "acc_pan_mis",
title = "Settings",
icon = bsicons::bs_icon("x-circle"),
shiny::uiOutput(ns("missings_method")),
shiny::uiOutput(ns("missings_var")),
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
shiny::br(),
shiny::actionButton(
inputId = ns("act_miss"),
label = i18n$t("Evaluate"),
width = "100%",
icon = shiny::icon("calculator"),
disabled = FALSE
)
)
)
),
...,
shiny::tagList(
gt::gt_output(outputId = ns("missings_table"))
)
)
}
## This should really just be rebuild to only contain a function
#'
#' @param data data
@ -5584,200 +5543,108 @@ data_missings_ui <- function(id, ...) {
#' @export
data_missings_server <- function(id,
data,
variable,
max_level=20,
...) {
shiny::moduleServer(
id = id,
module = function(input, output, session) {
ns <- session$ns
# ns <- session$ns
datar <- if (is.reactive(data)) data else reactive(data)
variabler <- if (is.reactive(variable)) variable else reactive(variable)
rv <- shiny::reactiveValues(
data = NULL,
table = NULL
)
## Notes
##
## Code export is still missing
## Direct table export would be nice
shiny::observe(
output$missings_method <- shiny::renderUI({
shiny::req(data())
vectorSelectInput(
inputId = ns("missings_method"),
label = i18n$t("Analysis method for missingness overview"),
choices = setNames(
c(
"predictors",
"outcome"
),
c(
i18n$t("Overview of missings across variables"),
i18n$t("Overview of difference in variables by missing status in outcome")
)
)
)
})
)
shiny::observe({
output$missings_var <- shiny::renderUI({
shiny::req(datar())
shiny::req(input$missings_method)
# browser()
if (input$missings_method == "predictors") {
label <- i18n$t("Select a variable for grouped overview")
df <- data_type_filter(data(), type = c("categorical", "dichotomous"))
col_subset <- c("none", names(df))
} else {
label <- i18n$t("Select outcome variable for overview")
df <- datar()[apply(datar(), 2, anyNA)]
col_subset <- names(df)
}
columnSelectInput(
inputId = ns("missings_var"),
label = label,
data = df,
col_subset = col_subset,
none_label = i18n$t("No variable")
)
})
})
shiny::observeEvent(
list(input$act_miss),
{
shiny::req(datar())
shiny::req(input$missings_var)
# browser()
rv$data <- shiny::reactive({
df_tbl <- datar()
by_var <- input$missings_var
parameters <- list(
by_var = by_var,
max_level = max_level,
type = input$missings_method
)
by_var <- variabler()
tryCatch(
{
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
out <- do.call(
compare_missings,
modifyList(parameters, list(data = df_tbl))
)
})
out <- compare_missings(df_tbl,by_var,max_level = max_level)
},
error = function(err) {
showNotification(paste0("Error: ", err), type = "err")
}
)
if (is.null(input$missings_var) || input$missings_var == "" || !input$missings_var %in% names(datar()) || input$missings_var == "none") {
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
# tbl <- rv$data()
out
})
output$missings_table <- gt::render_gt({
shiny::req(datar)
shiny::req(variabler)
if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(datar())) {
tbl <- rv$data()
if (anyNA(datar())){
if (input$missings_method == "predictors") {
title <- i18n$t("Overview of missing observations")
} else {
title <- i18n$t("No outcome measure chosen")
}
title <- i18n$t("No variable chosen for analysis")
} else {
title <- i18n$t("No missing observations")
}
} else {
## Due to reactivity, the table updates too quickly. this mitigates that issue..
if (input$missings_var == "predictors") {
title <- glue::glue(i18n$t("Missings across variables by the variable **'{input$missings_var}'**"))
} else {
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{input$missings_var}'**"))
}
}
attr(out, "tbl_title") <- title
rv$data <- shiny::reactive(out)
}
)
shiny::observeEvent(
list(
# input$act_miss
rv$data
),
{
output$missings_table <- gt::render_gt({
shiny::req(rv$data)
# shiny::req(input$missings_var)
# browser()
if ("p.value" %in% names(rv$data()[["table_body"]])) {
tbl <- rv$data()|>
gtsummary::bold_p()
} else {
tbl <- rv$data()
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{variabler()}'**"))
}
out <- tbl |>
gtsummary::as_gt() |>
gt::tab_header(title = gt::md(attr(tbl, "tbl_title")))
attr(out, "strat_var") <- input$missings_var
gt::tab_header(title = gt::md(title))
rv$table <- out
out
})
}
)
return(shiny::reactive(rv$table))
return(reactive(rv$table))
}
)
}
missing_demo_app <- function() {
ui <- do.call(
bslib::page,
c(
list(
title = i18n$t("Missings"),
icon = bsicons::bs_icon("x-circle")
ui <- shiny::fluidPage(
shiny::actionButton(
inputId = "modal_missings",
label = "Browse data",
width = "100%",
disabled = FALSE
),
data_missings_ui(id = "data")
)
shiny::selectInput(
inputId = "missings_var",
label = "Select variable to stratify analysis", choices = c("cyl", "vs")
),
data_missings_ui("data")
)
server <- function(input, output, session) {
data_demo <- mtcars
data_demo[sample(1:32, 10), "cyl"] <- NA
data_demo[sample(1:32, 8), "vs"] <- NA
data_missings_server(id = "data", data = data_demo)
data_missings_server(id = "data", data = data_demo, variable = shiny::reactive(input$missings_var))
# visual_summary_server(id = "visual", data = data_demo)
visual_summary_server(id = "visual", data = data_demo)
# observeEvent(input$modal_missings, {
# tryCatch(
# {
# modal_visual_summary(id = "visual")
# },
# error = function(err) {
# showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
# }
# )
# })
observeEvent(input$modal_missings, {
tryCatch(
{
modal_visual_summary(id = "visual")
},
error = function(err) {
showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
}
)
})
}
shiny::shinyApp(ui, server)
}
# missing_demo_app()
missing_demo_app()
#' Pairwise comparison of missings across covariables
#'
@ -5787,80 +5654,28 @@ missing_demo_app <- function() {
#' @returns gtsummary list object
#' @export
#'
compare_missings <- function(
data,
by_var,
max_level = 20,
type = c("predictors", "outcome")
) {
type <- match.arg(type)
compare_missings <- function(data,by_var,max_level=20){
if (!is.null(by_var) && by_var != "" && by_var %in% names(data)) {
data <- data |>
lapply(\(.x){
# browser()
if (is.factor(.x)){
cut_var(.x,breaks=20,type="top")
} else {
.x
}
}) |>
dplyr::bind_cols()
}) |> dplyr::bind_cols()
if (type == "predictors") {
data <- missings_logic_across(data, exclude = by_var)
} else {
data[[by_var]] <- ifelse(is.na(data[[by_var]]), "Missing", "Non-missing")
}
out <- gtsummary::tbl_summary(data, by = by_var) |>
gtsummary::add_p()
} else {
if (type == "predictors") {
data <- missings_logic_across(data)
}
out <- gtsummary::tbl_summary(data)
}
out
}
#' Converting all variables to logicals by missing status
#'
#' @param data data
#' @param exclude character vector of variable names to be excluded
#'
#' @returns data frame
#' @export
#'
#' @examples
#' mtcars |> missings_logic_across("cyl")
#' ## gtsummary::trial |>
#' ## missings_logic_across() |>
#' ## gtsummary::tbl_summary()
missings_logic_across <- function(data, exclude = NULL) {
# This function includes a approach way to preserve variable labels
names(data) |>
lapply(\(.x){
# browser()
# Saving original labels
lab <- REDCapCAST::get_attr(data[[.x]], attr = "label")
if (!.x %in% exclude) {
out <- is.na(data[[.x]])
} else {
out <- data[[.x]]
}
if (!is.na(lab)) {
# Restoring original labels, if not NA
REDCapCAST::set_attr(data = out, label = lab, attr = "label", overwrite = TRUE)
} else {
out
}
}) |>
dplyr::bind_cols(.name_repair = "unique_quiet") |>
setNames(names(data))
}
########
#### Current file: /Users/au301842/FreesearchR/R//plot_bar.R
@ -10289,20 +10104,10 @@ ui_elements <- function(selection) {
"Yes" = "yes"
)
),
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
shiny::br(),
shiny::radioButtons(
inputId = "add_diff",
label = i18n$t("Include group differences"),
selected = "no",
inline = TRUE,
choices = list(
"No" = "no",
"Yes" = "yes"
)
)
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
),
shiny::br(),
shiny::br(),
shiny::actionButton(
inputId = "act_eval",
label = i18n$t("Evaluate"),
@ -10351,15 +10156,26 @@ ui_elements <- function(selection) {
data_correlations_ui(id = "correlations", height = 600)
)
),
do.call(
bslib::nav_panel,
c(
list(
bslib::nav_panel(
title = i18n$t("Missings"),
icon = bsicons::bs_icon("x-circle")
icon = bsicons::bs_icon("x-circle"),
bslib::layout_sidebar(
sidebar = bslib::sidebar(
bslib::accordion(
id = "acc_mis",
open = "acc_chars",
multiple = FALSE,
bslib::accordion_panel(
value = "acc_pan_mis",
title = "Settings",
icon = bsicons::bs_icon("x-circle"),
shiny::uiOutput("missings_var"),
shiny::helpText(i18n$t("To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."))
)
)
),
data_missings_ui(id = "missingness",
validation_ui("validation_mcar"))
validation_ui("validation_mcar"),
data_missings_ui(id = "missingness")
)
)
),
@ -11622,7 +11438,7 @@ convert_to <- function(data,
#' Get variable(s) to convert
#'
#' @param vars variables, output from summary_vars() function
#' @param vars Output of [summary_vars()]
#' @param classes_input List of inputs containing new classes
#'
#' @return a `data.table`.
@ -11855,9 +11671,6 @@ validation_server <- function(id,
purrr::list_flatten()
} else if (length(to_validate) > 0) {
out <- make_validation_alerts(to_validate)
} else {
## Defaulting to an emptu output vector
out <- character()
}
valid_ui$x <- tagList(out)
}
@ -12081,7 +11894,7 @@ validation_lib <- function(name = NULL) {
"mcar" = function(x, y) {
### Placeholder for missingness validation
list(
string = i18n$t("There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."),
string = i18n$t("There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."),
summary.fun = mcar_validate,
summary.fun.args = list(
data = x,
@ -13110,7 +12923,6 @@ server <- function(input, output, session) {
shiny::updateActionButton(inputId = "modal_browse", disabled = TRUE)
shiny::updateActionButton(inputId = "modal_visual_overview", disabled = TRUE)
shiny::updateActionButton(inputId = "act_eval", disabled = TRUE)
# shiny::updateActionButton(inputId = "act_miss", disabled = TRUE)
# bslib::nav_hide(id = "main_panel",
# target = "nav_visuals")
@ -13119,7 +12931,6 @@ server <- function(input, output, session) {
shiny::updateActionButton(inputId = "modal_browse", disabled = FALSE)
shiny::updateActionButton(inputId = "modal_visual_overview", disabled = FALSE)
shiny::updateActionButton(inputId = "act_eval", disabled = FALSE)
# shiny::updateActionButton(inputId = "act_miss", disabled = FALSE)
# bslib::nav_show(id = "main_panel",
# target = "nav_visuals")
@ -13135,6 +12946,7 @@ server <- function(input, output, session) {
})
##############################################################################
#########
######### Data modification section
@ -13373,13 +13185,12 @@ server <- function(input, output, session) {
# mcar_validate(data=rv$missings()[["_data"]],outcome = input$missings_var)
if (!is.null(rv$missings())) {
req(rv$missings())
# req(input$missings_var)
# browser()
req(input$missings_var)
rv_validations$mcar <- make_validation(
ls = validation_lib("mcar"),
list(
x = rv$missings()[["_data"]],
y = attr(rv$missings(), "strat_var")
y = input$missings_var
)
)
}
@ -13712,6 +13523,8 @@ server <- function(input, output, session) {
# })
shiny::observeEvent(
list(
input$act_eval
@ -13723,11 +13536,11 @@ server <- function(input, output, session) {
shiny::req(rv$list$data)
parameters <- list(
by.var = input$strat_var,
add.p = input$add_p == "yes",
add.overall = TRUE,
add.diff = input$add_diff == "yes",
# theme = input$baseline_theme,
detail_level = input$detail_level
)
@ -13804,16 +13617,25 @@ server <- function(input, output, session) {
cutoff = shiny::reactive(input$cor_cutoff)
)
## Missingness evaluation
shiny::observe(
output$missings_var <- shiny::renderUI({
columnSelectInput(
inputId = "missings_var",
label = i18n$t("Select variable to stratify analysis"),
data = shiny::reactive({
shiny::req(rv$data_filtered)
rv$data_filtered[apply(rv$data_filtered, 2, anyNA)]
})()
)
})
)
rv$missings <- data_missings_server(
id = "missingness",
data = shiny::reactive(rv$data_filtered)
data = shiny::reactive(rv$data_filtered),
variable = shiny::reactive(input$missings_var)
)
# shiny::observe({
# req(rv$missings())
# browser()

File diff suppressed because one or more lines are too long

View file

@ -150,7 +150,10 @@
"Settings","Indstillinger"
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
"No variable chosen for analysis","Ingen variabel er valgt til analysen"
"No missing observations","Ingen manglende observationer"
"Missing vs non-missing observations in the variable **'{variabler()}'**","Manglende vs ikke-manglende observationer i variablen **'{variabler()}'**"
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","Der er en betydelig korrelation blandt {n_nonmcar} variabler sammenlignet efter manglende observationer i {outcome}."
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
"Median:","Median:"
"Restore original data","Gendan originale data"
@ -243,9 +246,11 @@
"Data characteristics table","Oversigtstabel"
"The dataset without text variables","Datasættet uden variabler formateret som tekst"
"Creating the table. Hold on for a moment..","Opretter tabellen. Vent et øjeblik.."
"Select variable to stratify analysis","Vælg variabler til at stratificere analysen"
"Generating the report. Hold on for a moment..","Opretter rapporten. Vent et øjeblik.."
"We encountered the following error showing missingness:","Under analysen af manglende observationer opstod følgende fejl:"
"We encountered the following error browsing your data:","I forsøget på at vise en dataoversigt opstod følgende fejl:"
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","Vælg svarvariablen, for at få hjælp til at vurdere om manglende observationer manglende tilfældigt eller ej (kun variabler med manglende data kan vælges). Hvis der er statistisk signifikant forskel mellem nogle af de øvrige variabler i forhold til manglende data i den valgte variable kan det være et udtryk for at data ikke mangler tilfældigt."
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Vælg et navn til den nye variabel, skriv din formel og tryk så på knappen for at gemme variablen, eller annuler for at lukke uden at gemme."
"Please fill in web address and API token, then press 'Connect'.","Udfyld serveradresse og API-nøgle, og tryk så 'Fobind'."
"Other","Other"
@ -294,16 +299,3 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"

1 en da
150 Settings Indstillinger
151 The following error occured on determining correlations: Følgende fejl opstod i forbindelse med korrelationsanalysen:
152 We encountered the following error creating your report: Følgende fejl opstod, da rapporten blev dannet:
153 No variable chosen for analysis Ingen variabel er valgt til analysen
154 No missing observations Ingen manglende observationer
155 Missing vs non-missing observations in the variable **'{variabler()}'** Manglende vs ikke-manglende observationer i variablen **'{variabler()}'**
156 There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}. Der er en betydelig korrelation blandt {n_nonmcar} variabler sammenlignet efter manglende observationer i {outcome}.
157 There is a total of {p_miss} % missing observations. Der er i alt {p_miss} % manglende observationer.
158 Median: Median:
159 Restore original data Gendan originale data
246 Data characteristics table Oversigtstabel
247 The dataset without text variables Datasættet uden variabler formateret som tekst
248 Creating the table. Hold on for a moment.. Opretter tabellen. Vent et øjeblik..
249 Select variable to stratify analysis Vælg variabler til at stratificere analysen
250 Generating the report. Hold on for a moment.. Opretter rapporten. Vent et øjeblik..
251 We encountered the following error showing missingness: Under analysen af manglende observationer opstod følgende fejl:
252 We encountered the following error browsing your data: I forsøget på at vise en dataoversigt opstod følgende fejl:
253 To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random. Vælg svarvariablen, for at få hjælp til at vurdere om manglende observationer manglende tilfældigt eller ej (kun variabler med manglende data kan vælges). Hvis der er statistisk signifikant forskel mellem nogle af de øvrige variabler i forhold til manglende data i den valgte variable kan det være et udtryk for at data ikke mangler tilfældigt.
254 Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything. Vælg et navn til den nye variabel, skriv din formel og tryk så på knappen for at gemme variablen, eller annuler for at lukke uden at gemme.
255 Please fill in web address and API token, then press 'Connect'. Udfyld serveradresse og API-nøgle, og tryk så 'Fobind'.
256 Other Other
299 Words Words
300 Shorten to first letters Shorten to first letters
301 Shorten to first words Shorten to first words
Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
Overview of missing observations Overview of missing observations
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -103,7 +103,9 @@
"You can choose between these file types:","You can choose between these file types:"
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
"First five rows are shown below:","First five rows are shown below:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
"Import data from REDCap","Import data from REDCap"
"REDCap server","REDCap server"
@ -205,6 +207,7 @@
"Correlation cut-off","Correlation cut-off"
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
"Missings","Missings"
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
"Visuals","Visuals"
"Analysis validation","Analysis validation"
"Report","Report"
@ -227,6 +230,7 @@
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
"Class","Class"
"Observations","Observations"
@ -263,6 +267,7 @@
"The dataset without text variables","The dataset without text variables"
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
@ -294,16 +299,3 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"

1 en de
103 You can choose between these file types: You can choose between these file types:
104 You can import {file_extensions_text} files You can import {file_extensions_text} files
105 First five rows are shown below: First five rows are shown below:
106 No variable chosen for analysis No variable chosen for analysis
107 No missing observations No missing observations
108 Missing vs non-missing observations in the variable **'{variabler()}'** Missing vs non-missing observations in the variable **'{variabler()}'**
109 Grouped by {get_label(data,ter)} Grouped by {get_label(data,ter)}
110 Import data from REDCap Import data from REDCap
111 REDCap server REDCap server
207 Correlation cut-off Correlation cut-off
208 Set the cut-off for considered 'highly correlated'. Set the cut-off for considered 'highly correlated'.
209 Missings Missings
210 To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random. To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.
211 Visuals Visuals
212 Analysis validation Analysis validation
213 Report Report
230 You removed {p_out} % of observations. You removed {p_out} % of observations.
231 You removed {p_out} % of variables. You removed {p_out} % of variables.
232 There is a total of {p_miss} % missing observations. There is a total of {p_miss} % missing observations.
233 There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}. There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.
234 Data includes {n_pairs} pairs of highly correlated variables. Data includes {n_pairs} pairs of highly correlated variables.
235 Class Class
236 Observations Observations
267 The dataset without text variables The dataset without text variables
268 The data includes {n_col} variables. Please limit to 100. The data includes {n_col} variables. Please limit to 100.
269 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
270 Select variable to stratify analysis Select variable to stratify analysis
271 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
272 We encountered the following error creating your report: We encountered the following error creating your report:
273 There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data. There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.
299 Words Words
300 Shorten to first letters Shorten to first letters
301 Shorten to first words Shorten to first words
Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
Overview of missing observations Overview of missing observations
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -103,7 +103,9 @@
"You can choose between these file types:","You can choose between these file types:"
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
"First five rows are shown below:","First five rows are shown below:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
"Import data from REDCap","Import data from REDCap"
"REDCap server","REDCap server"
@ -205,6 +207,7 @@
"Correlation cut-off","Correlation cut-off"
"Set the cut-off for considered 'highly correlated'.","Set the cut-off for considered 'highly correlated'."
"Missings","Missings"
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
"Visuals","Visuals"
"Analysis validation","Analysis validation"
"Report","Report"
@ -227,6 +230,7 @@
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
"Data includes {n_pairs} pairs of highly correlated variables.","Data includes {n_pairs} pairs of highly correlated variables."
"Class","Class"
"Observations","Observations"
@ -263,6 +267,7 @@
"The dataset without text variables","The dataset without text variables"
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
@ -294,16 +299,3 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"

1 en sv
103 You can choose between these file types: You can choose between these file types:
104 You can import {file_extensions_text} files You can import {file_extensions_text} files
105 First five rows are shown below: First five rows are shown below:
106 No variable chosen for analysis No variable chosen for analysis
107 No missing observations No missing observations
108 Missing vs non-missing observations in the variable **'{variabler()}'** Missing vs non-missing observations in the variable **'{variabler()}'**
109 Grouped by {get_label(data,ter)} Grouped by {get_label(data,ter)}
110 Import data from REDCap Import data from REDCap
111 REDCap server REDCap server
207 Correlation cut-off Correlation cut-off
208 Set the cut-off for considered 'highly correlated'. Set the cut-off for considered 'highly correlated'.
209 Missings Missings
210 To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random. To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.
211 Visuals Visuals
212 Analysis validation Analysis validation
213 Report Report
230 You removed {p_out} % of observations. You removed {p_out} % of observations.
231 You removed {p_out} % of variables. You removed {p_out} % of variables.
232 There is a total of {p_miss} % missing observations. There is a total of {p_miss} % missing observations.
233 There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}. There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.
234 Data includes {n_pairs} pairs of highly correlated variables. Data includes {n_pairs} pairs of highly correlated variables.
235 Class Class
236 Observations Observations
267 The dataset without text variables The dataset without text variables
268 The data includes {n_col} variables. Please limit to 100. The data includes {n_col} variables. Please limit to 100.
269 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
270 Select variable to stratify analysis Select variable to stratify analysis
271 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
272 We encountered the following error creating your report: We encountered the following error creating your report:
273 There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data. There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.
299 Words Words
300 Shorten to first letters Shorten to first letters
301 Shorten to first words Shorten to first words
Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
Overview of missing observations Overview of missing observations
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -150,7 +150,10 @@
"Settings","Settings"
"The following error occured on determining correlations:","The following error occured on determining correlations:"
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"Missing vs non-missing observations in the variable **'{variabler()}'**","Missing vs non-missing observations in the variable **'{variabler()}'**"
"There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.","There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
"Median:","Median:"
"Restore original data","Restore original data"
@ -243,9 +246,11 @@
"Data characteristics table","Data characteristics table"
"The dataset without text variables","The dataset without text variables"
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
"To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.","To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."
"Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.","Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything."
"Other","Other"
"Hour of the day","Hour of the day"
@ -294,16 +299,3 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"

1 en sw
150 Settings Settings
151 The following error occured on determining correlations: The following error occured on determining correlations:
152 We encountered the following error creating your report: We encountered the following error creating your report:
153 No variable chosen for analysis No variable chosen for analysis
154 No missing observations No missing observations
155 Missing vs non-missing observations in the variable **'{variabler()}'** Missing vs non-missing observations in the variable **'{variabler()}'**
156 There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}. There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}.
157 There is a total of {p_miss} % missing observations. There is a total of {p_miss} % missing observations.
158 Median: Median:
159 Restore original data Restore original data
246 Data characteristics table Data characteristics table
247 The dataset without text variables The dataset without text variables
248 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
249 Select variable to stratify analysis Select variable to stratify analysis
250 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
251 We encountered the following error showing missingness: We encountered the following error showing missingness:
252 We encountered the following error browsing your data: We encountered the following error browsing your data:
253 To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random. To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random.
254 Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything. Choose a name for the column to be created or modified, then enter an expression before clicking on the button below to create the variable, or cancel to exit without saving anything.
255 Other Other
256 Hour of the day Hour of the day
299 Words Words
300 Shorten to first letters Shorten to first letters
301 Shorten to first words Shorten to first words
Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
Overview of missing observations Overview of missing observations
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -91,12 +91,3 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
}
});
// window.addEventListener('beforeunload', function (e) {
// // Cancel the event
// e.preventDefault();
// // Chrome requires returnValue to be set
// e.returnValue = '';
// // Some browsers display this message, others show a generic one
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
// });

View file

@ -1,7 +1,7 @@
########
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpftDBtp/file7bf313edd9e8.R
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpejDCIE/filec7541d50b50.R
########
i18n_path <- system.file("translations", package = "FreesearchR")
@ -49,7 +49,6 @@ library(shiny.i18n)
## Translation init
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
# i18n <- shiny.i18n::Translator$new(translation_csvs_path = here::here("inst/translations/"))
i18n$set_translation_language("en")
@ -63,7 +62,7 @@ i18n$set_translation_language("en")
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
########
app_version <- function()'25.12.5'
app_version <- function()'25.12.2'
########
@ -109,7 +108,7 @@ baseline_table <- function(data, fun.args = NULL, fun = gtsummary::tbl_summary,
#' mtcars |> create_baseline(by.var = "gear", detail_level = "extended",type = list(gtsummary::all_dichotomous() ~ "categorical"),theme="nejm")
#'
#' create_baseline(default_parsing(mtcars), by.var = "am", add.p = FALSE, add.overall = FALSE, theme = "lancet")
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
create_baseline <- function(data, ..., by.var, add.p = FALSE, add.overall = FALSE, theme = c("jama", "lancet", "nejm", "qjecon"), detail_level = c("minimal", "extended")) {
theme <- match.arg(theme)
detail_level <- match.arg(detail_level)
@ -172,10 +171,6 @@ create_baseline <- function(data, ..., by.var, add.p = FALSE, add.diff=FALSE, ad
gtsummary::add_p() |>
gtsummary::bold_p()
}
if (isTRUE(add.diff)) {
out <- out |>
gtsummary::add_difference()
}
}
out
@ -861,18 +856,8 @@ make_choices_with_infos <- function(data) {
#' @importFrom shiny selectizeInput
#' @export
#'
columnSelectInput <- function(
inputId,
label,
data,
selected = "",
...,
col_subset = NULL,
placeholder = "",
onInitialize,
none_label = "No variable selected",
maxItems = NULL
) {
columnSelectInput <- function(inputId, label, data, selected = "", ...,
col_subset = NULL, placeholder = "", onInitialize, none_label="No variable selected",maxItems=NULL) {
datar <- if (is.reactive(data)) data else reactive(data)
col_subsetr <- if (is.reactive(col_subset)) col_subset else reactive(col_subset)
@ -1037,6 +1022,8 @@ vectorSelectInput <- function(inputId,
}
########
#### Current file: /Users/au301842/FreesearchR/R//cut_var.R
########
@ -2675,7 +2662,7 @@ create_plot <- function(data, type, pri, sec, ter = NULL, ...) {
out
}
#' Print label, and if missing print variable name for plots
#' Print label, and if missing print variable name
#'
#' @param data vector or data frame
#' @param var variable name. Optional.
@ -4442,7 +4429,7 @@ data_types <- function() {
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
########
hosted_version <- function()'v25.12.5-251211'
hosted_version <- function()'v25.12.2-251203'
########
@ -5534,46 +5521,18 @@ launch_FreesearchR <- function(...){
#' Data correlations evaluation module
#'
#' @param id Module id
#' @param ... additional UI elements to show before the table overview
#'
#' @name data-missings
#' @returns Shiny ui module
#' @export
data_missings_ui <- function(id, ...) {
data_missings_ui <- function(id) {
ns <- shiny::NS(id)
list(
bslib::layout_sidebar(
sidebar = bslib::sidebar(
bslib::accordion(
id = ns("acc_mis"),
open = "acc_chars",
multiple = FALSE,
bslib::accordion_panel(
value = "acc_pan_mis",
title = "Settings",
icon = bsicons::bs_icon("x-circle"),
shiny::uiOutput(ns("missings_method")),
shiny::uiOutput(ns("missings_var")),
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
shiny::br(),
shiny::actionButton(
inputId = ns("act_miss"),
label = i18n$t("Evaluate"),
width = "100%",
icon = shiny::icon("calculator"),
disabled = FALSE
)
)
)
),
...,
shiny::tagList(
gt::gt_output(outputId = ns("missings_table"))
)
)
}
## This should really just be rebuild to only contain a function
#'
#' @param data data
@ -5584,200 +5543,108 @@ data_missings_ui <- function(id, ...) {
#' @export
data_missings_server <- function(id,
data,
variable,
max_level=20,
...) {
shiny::moduleServer(
id = id,
module = function(input, output, session) {
ns <- session$ns
# ns <- session$ns
datar <- if (is.reactive(data)) data else reactive(data)
variabler <- if (is.reactive(variable)) variable else reactive(variable)
rv <- shiny::reactiveValues(
data = NULL,
table = NULL
)
## Notes
##
## Code export is still missing
## Direct table export would be nice
shiny::observe(
output$missings_method <- shiny::renderUI({
shiny::req(data())
vectorSelectInput(
inputId = ns("missings_method"),
label = i18n$t("Analysis method for missingness overview"),
choices = setNames(
c(
"predictors",
"outcome"
),
c(
i18n$t("Overview of missings across variables"),
i18n$t("Overview of difference in variables by missing status in outcome")
)
)
)
})
)
shiny::observe({
output$missings_var <- shiny::renderUI({
shiny::req(datar())
shiny::req(input$missings_method)
# browser()
if (input$missings_method == "predictors") {
label <- i18n$t("Select a variable for grouped overview")
df <- data_type_filter(data(), type = c("categorical", "dichotomous"))
col_subset <- c("none", names(df))
} else {
label <- i18n$t("Select outcome variable for overview")
df <- datar()[apply(datar(), 2, anyNA)]
col_subset <- names(df)
}
columnSelectInput(
inputId = ns("missings_var"),
label = label,
data = df,
col_subset = col_subset,
none_label = i18n$t("No variable")
)
})
})
shiny::observeEvent(
list(input$act_miss),
{
shiny::req(datar())
shiny::req(input$missings_var)
# browser()
rv$data <- shiny::reactive({
df_tbl <- datar()
by_var <- input$missings_var
parameters <- list(
by_var = by_var,
max_level = max_level,
type = input$missings_method
)
by_var <- variabler()
tryCatch(
{
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
out <- do.call(
compare_missings,
modifyList(parameters, list(data = df_tbl))
)
})
out <- compare_missings(df_tbl,by_var,max_level = max_level)
},
error = function(err) {
showNotification(paste0("Error: ", err), type = "err")
}
)
if (is.null(input$missings_var) || input$missings_var == "" || !input$missings_var %in% names(datar()) || input$missings_var == "none") {
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
# tbl <- rv$data()
out
})
output$missings_table <- gt::render_gt({
shiny::req(datar)
shiny::req(variabler)
if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(datar())) {
tbl <- rv$data()
if (anyNA(datar())){
if (input$missings_method == "predictors") {
title <- i18n$t("Overview of missing observations")
} else {
title <- i18n$t("No outcome measure chosen")
}
title <- i18n$t("No variable chosen for analysis")
} else {
title <- i18n$t("No missing observations")
}
} else {
## Due to reactivity, the table updates too quickly. this mitigates that issue..
if (input$missings_var == "predictors") {
title <- glue::glue(i18n$t("Missings across variables by the variable **'{input$missings_var}'**"))
} else {
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{input$missings_var}'**"))
}
}
attr(out, "tbl_title") <- title
rv$data <- shiny::reactive(out)
}
)
shiny::observeEvent(
list(
# input$act_miss
rv$data
),
{
output$missings_table <- gt::render_gt({
shiny::req(rv$data)
# shiny::req(input$missings_var)
# browser()
if ("p.value" %in% names(rv$data()[["table_body"]])) {
tbl <- rv$data()|>
gtsummary::bold_p()
} else {
tbl <- rv$data()
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{variabler()}'**"))
}
out <- tbl |>
gtsummary::as_gt() |>
gt::tab_header(title = gt::md(attr(tbl, "tbl_title")))
attr(out, "strat_var") <- input$missings_var
gt::tab_header(title = gt::md(title))
rv$table <- out
out
})
}
)
return(shiny::reactive(rv$table))
return(reactive(rv$table))
}
)
}
missing_demo_app <- function() {
ui <- do.call(
bslib::page,
c(
list(
title = i18n$t("Missings"),
icon = bsicons::bs_icon("x-circle")
ui <- shiny::fluidPage(
shiny::actionButton(
inputId = "modal_missings",
label = "Browse data",
width = "100%",
disabled = FALSE
),
data_missings_ui(id = "data")
)
shiny::selectInput(
inputId = "missings_var",
label = "Select variable to stratify analysis", choices = c("cyl", "vs")
),
data_missings_ui("data")
)
server <- function(input, output, session) {
data_demo <- mtcars
data_demo[sample(1:32, 10), "cyl"] <- NA
data_demo[sample(1:32, 8), "vs"] <- NA
data_missings_server(id = "data", data = data_demo)
data_missings_server(id = "data", data = data_demo, variable = shiny::reactive(input$missings_var))
# visual_summary_server(id = "visual", data = data_demo)
visual_summary_server(id = "visual", data = data_demo)
# observeEvent(input$modal_missings, {
# tryCatch(
# {
# modal_visual_summary(id = "visual")
# },
# error = function(err) {
# showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
# }
# )
# })
observeEvent(input$modal_missings, {
tryCatch(
{
modal_visual_summary(id = "visual")
},
error = function(err) {
showNotification(paste0("We encountered the following error browsing your data: ", err), type = "err")
}
)
})
}
shiny::shinyApp(ui, server)
}
# missing_demo_app()
missing_demo_app()
#' Pairwise comparison of missings across covariables
#'
@ -5787,80 +5654,28 @@ missing_demo_app <- function() {
#' @returns gtsummary list object
#' @export
#'
compare_missings <- function(
data,
by_var,
max_level = 20,
type = c("predictors", "outcome")
) {
type <- match.arg(type)
compare_missings <- function(data,by_var,max_level=20){
if (!is.null(by_var) && by_var != "" && by_var %in% names(data)) {
data <- data |>
lapply(\(.x){
# browser()
if (is.factor(.x)){
cut_var(.x,breaks=20,type="top")
} else {
.x
}
}) |>
dplyr::bind_cols()
}) |> dplyr::bind_cols()
if (type == "predictors") {
data <- missings_logic_across(data, exclude = by_var)
} else {
data[[by_var]] <- ifelse(is.na(data[[by_var]]), "Missing", "Non-missing")
}
out <- gtsummary::tbl_summary(data, by = by_var) |>
gtsummary::add_p()
} else {
if (type == "predictors") {
data <- missings_logic_across(data)
}
out <- gtsummary::tbl_summary(data)
}
out
}
#' Converting all variables to logicals by missing status
#'
#' @param data data
#' @param exclude character vector of variable names to be excluded
#'
#' @returns data frame
#' @export
#'
#' @examples
#' mtcars |> missings_logic_across("cyl")
#' ## gtsummary::trial |>
#' ## missings_logic_across() |>
#' ## gtsummary::tbl_summary()
missings_logic_across <- function(data, exclude = NULL) {
# This function includes a approach way to preserve variable labels
names(data) |>
lapply(\(.x){
# browser()
# Saving original labels
lab <- REDCapCAST::get_attr(data[[.x]], attr = "label")
if (!.x %in% exclude) {
out <- is.na(data[[.x]])
} else {
out <- data[[.x]]
}
if (!is.na(lab)) {
# Restoring original labels, if not NA
REDCapCAST::set_attr(data = out, label = lab, attr = "label", overwrite = TRUE)
} else {
out
}
}) |>
dplyr::bind_cols(.name_repair = "unique_quiet") |>
setNames(names(data))
}
########
#### Current file: /Users/au301842/FreesearchR/R//plot_bar.R
@ -10289,20 +10104,10 @@ ui_elements <- function(selection) {
"Yes" = "yes"
)
),
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
shiny::br(),
shiny::radioButtons(
inputId = "add_diff",
label = i18n$t("Include group differences"),
selected = "no",
inline = TRUE,
choices = list(
"No" = "no",
"Yes" = "yes"
)
)
shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table."))
),
shiny::br(),
shiny::br(),
shiny::actionButton(
inputId = "act_eval",
label = i18n$t("Evaluate"),
@ -10351,15 +10156,26 @@ ui_elements <- function(selection) {
data_correlations_ui(id = "correlations", height = 600)
)
),
do.call(
bslib::nav_panel,
c(
list(
bslib::nav_panel(
title = i18n$t("Missings"),
icon = bsicons::bs_icon("x-circle")
icon = bsicons::bs_icon("x-circle"),
bslib::layout_sidebar(
sidebar = bslib::sidebar(
bslib::accordion(
id = "acc_mis",
open = "acc_chars",
multiple = FALSE,
bslib::accordion_panel(
value = "acc_pan_mis",
title = "Settings",
icon = bsicons::bs_icon("x-circle"),
shiny::uiOutput("missings_var"),
shiny::helpText(i18n$t("To consider if data is missing by random, choose the outcome/dependent variable (only variables with any missings are available). If there is a significant difference across other variables depending on missing observations, it may not be missing at random."))
)
)
),
data_missings_ui(id = "missingness",
validation_ui("validation_mcar"))
validation_ui("validation_mcar"),
data_missings_ui(id = "missingness")
)
)
),
@ -11622,7 +11438,7 @@ convert_to <- function(data,
#' Get variable(s) to convert
#'
#' @param vars variables, output from summary_vars() function
#' @param vars Output of [summary_vars()]
#' @param classes_input List of inputs containing new classes
#'
#' @return a `data.table`.
@ -11855,9 +11671,6 @@ validation_server <- function(id,
purrr::list_flatten()
} else if (length(to_validate) > 0) {
out <- make_validation_alerts(to_validate)
} else {
## Defaulting to an emptu output vector
out <- character()
}
valid_ui$x <- tagList(out)
}
@ -12081,7 +11894,7 @@ validation_lib <- function(name = NULL) {
"mcar" = function(x, y) {
### Placeholder for missingness validation
list(
string = i18n$t("There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."),
string = i18n$t("There is a significant correlation between {n_nonmcar} variables and missing observations in the outcome variable {outcome}."),
summary.fun = mcar_validate,
summary.fun.args = list(
data = x,
@ -13110,7 +12923,6 @@ server <- function(input, output, session) {
shiny::updateActionButton(inputId = "modal_browse", disabled = TRUE)
shiny::updateActionButton(inputId = "modal_visual_overview", disabled = TRUE)
shiny::updateActionButton(inputId = "act_eval", disabled = TRUE)
# shiny::updateActionButton(inputId = "act_miss", disabled = TRUE)
# bslib::nav_hide(id = "main_panel",
# target = "nav_visuals")
@ -13119,7 +12931,6 @@ server <- function(input, output, session) {
shiny::updateActionButton(inputId = "modal_browse", disabled = FALSE)
shiny::updateActionButton(inputId = "modal_visual_overview", disabled = FALSE)
shiny::updateActionButton(inputId = "act_eval", disabled = FALSE)
# shiny::updateActionButton(inputId = "act_miss", disabled = FALSE)
# bslib::nav_show(id = "main_panel",
# target = "nav_visuals")
@ -13135,6 +12946,7 @@ server <- function(input, output, session) {
})
##############################################################################
#########
######### Data modification section
@ -13373,13 +13185,12 @@ server <- function(input, output, session) {
# mcar_validate(data=rv$missings()[["_data"]],outcome = input$missings_var)
if (!is.null(rv$missings())) {
req(rv$missings())
# req(input$missings_var)
# browser()
req(input$missings_var)
rv_validations$mcar <- make_validation(
ls = validation_lib("mcar"),
list(
x = rv$missings()[["_data"]],
y = attr(rv$missings(), "strat_var")
y = input$missings_var
)
)
}
@ -13712,6 +13523,8 @@ server <- function(input, output, session) {
# })
shiny::observeEvent(
list(
input$act_eval
@ -13723,11 +13536,11 @@ server <- function(input, output, session) {
shiny::req(rv$list$data)
parameters <- list(
by.var = input$strat_var,
add.p = input$add_p == "yes",
add.overall = TRUE,
add.diff = input$add_diff == "yes",
# theme = input$baseline_theme,
detail_level = input$detail_level
)
@ -13804,16 +13617,25 @@ server <- function(input, output, session) {
cutoff = shiny::reactive(input$cor_cutoff)
)
## Missingness evaluation
shiny::observe(
output$missings_var <- shiny::renderUI({
columnSelectInput(
inputId = "missings_var",
label = i18n$t("Select variable to stratify analysis"),
data = shiny::reactive({
shiny::req(rv$data_filtered)
rv$data_filtered[apply(rv$data_filtered, 2, anyNA)]
})()
)
})
)
rv$missings <- data_missings_server(
id = "missingness",
data = shiny::reactive(rv$data_filtered)
data = shiny::reactive(rv$data_filtered),
variable = shiny::reactive(input$missings_var)
)
# shiny::observe({
# req(rv$missings())
# browser()

View file

@ -91,12 +91,3 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
}
});
// window.addEventListener('beforeunload', function (e) {
// // Cancel the event
// e.preventDefault();
// // Chrome requires returnValue to be set
// e.returnValue = '';
// // Some browsers display this message, others show a generic one
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
// });

View file

@ -91,12 +91,3 @@ $(document).on('focus', '.smart-dropdown .selectize-control input', function() {
}
});
// window.addEventListener('beforeunload', function (e) {
// // Cancel the event
// e.preventDefault();
// // Chrome requires returnValue to be set
// e.returnValue = '';
// // Some browsers display this message, others show a generic one
// return 'Are you sure you want to leave? Any unsaved changes will be lost.';
// });

View file

@ -150,6 +150,7 @@
"Settings","Indstillinger"
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
"No variable chosen for analysis","Ingen variabel er valgt til analysen"
"No missing observations","Ingen manglende observationer"
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
"Median:","Median:"
@ -243,6 +244,7 @@
"Data characteristics table","Oversigtstabel"
"The dataset without text variables","Datasættet uden variabler formateret som tekst"
"Creating the table. Hold on for a moment..","Opretter tabellen. Vent et øjeblik.."
"Select variable to stratify analysis","Vælg variabler til at stratificere analysen"
"Generating the report. Hold on for a moment..","Opretter rapporten. Vent et øjeblik.."
"We encountered the following error showing missingness:","Under analysen af manglende observationer opstod følgende fejl:"
"We encountered the following error browsing your data:","I forsøget på at vise en dataoversigt opstod følgende fejl:"
@ -294,16 +296,11 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Select missings analysis to apply","Select missings analysis to apply"
"Variables","Variables"
"By outcome","By outcome"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."

1 en da
150 Settings Indstillinger
151 The following error occured on determining correlations: Følgende fejl opstod i forbindelse med korrelationsanalysen:
152 We encountered the following error creating your report: Følgende fejl opstod, da rapporten blev dannet:
153 No variable chosen for analysis Ingen variabel er valgt til analysen
154 No missing observations Ingen manglende observationer
155 There is a total of {p_miss} % missing observations. Der er i alt {p_miss} % manglende observationer.
156 Median: Median:
244 Data characteristics table Oversigtstabel
245 The dataset without text variables Datasættet uden variabler formateret som tekst
246 Creating the table. Hold on for a moment.. Opretter tabellen. Vent et øjeblik..
247 Select variable to stratify analysis Vælg variabler til at stratificere analysen
248 Generating the report. Hold on for a moment.. Opretter rapporten. Vent et øjeblik..
249 We encountered the following error showing missingness: Under analysen af manglende observationer opstod følgende fejl:
250 We encountered the following error browsing your data: I forsøget på at vise en dataoversigt opstod følgende fejl:
296 Words Words
297 Shorten to first letters Shorten to first letters
298 Shorten to first words Shorten to first words
299 Select missings analysis to apply Select missings analysis to apply
300 Variables Variables
301 By outcome By outcome
302 Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
303 Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
304 Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
305 Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
306 Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -103,6 +103,7 @@
"You can choose between these file types:","You can choose between these file types:"
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
"First five rows are shown below:","First five rows are shown below:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
"Import data from REDCap","Import data from REDCap"
@ -263,6 +264,7 @@
"The dataset without text variables","The dataset without text variables"
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
@ -294,16 +296,11 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Select missings analysis to apply","Select missings analysis to apply"
"Variables","Variables"
"By outcome","By outcome"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."

1 en de
103 You can choose between these file types: You can choose between these file types:
104 You can import {file_extensions_text} files You can import {file_extensions_text} files
105 First five rows are shown below: First five rows are shown below:
106 No variable chosen for analysis No variable chosen for analysis
107 No missing observations No missing observations
108 Grouped by {get_label(data,ter)} Grouped by {get_label(data,ter)}
109 Import data from REDCap Import data from REDCap
264 The dataset without text variables The dataset without text variables
265 The data includes {n_col} variables. Please limit to 100. The data includes {n_col} variables. Please limit to 100.
266 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
267 Select variable to stratify analysis Select variable to stratify analysis
268 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
269 We encountered the following error creating your report: We encountered the following error creating your report:
270 There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data. There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.
296 Words Words
297 Shorten to first letters Shorten to first letters
298 Shorten to first words Shorten to first words
299 Select missings analysis to apply Select missings analysis to apply
300 Variables Variables
301 By outcome By outcome
302 Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
303 Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
304 Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
305 Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
306 Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -103,6 +103,7 @@
"You can choose between these file types:","You can choose between these file types:"
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
"First five rows are shown below:","First five rows are shown below:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}"
"Import data from REDCap","Import data from REDCap"
@ -263,6 +264,7 @@
"The dataset without text variables","The dataset without text variables"
"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100."
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
@ -294,16 +296,11 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Select missings analysis to apply","Select missings analysis to apply"
"Variables","Variables"
"By outcome","By outcome"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."

1 en sv
103 You can choose between these file types: You can choose between these file types:
104 You can import {file_extensions_text} files You can import {file_extensions_text} files
105 First five rows are shown below: First five rows are shown below:
106 No variable chosen for analysis No variable chosen for analysis
107 No missing observations No missing observations
108 Grouped by {get_label(data,ter)} Grouped by {get_label(data,ter)}
109 Import data from REDCap Import data from REDCap
264 The dataset without text variables The dataset without text variables
265 The data includes {n_col} variables. Please limit to 100. The data includes {n_col} variables. Please limit to 100.
266 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
267 Select variable to stratify analysis Select variable to stratify analysis
268 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
269 We encountered the following error creating your report: We encountered the following error creating your report:
270 There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data. There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.
296 Words Words
297 Shorten to first letters Shorten to first letters
298 Shorten to first words Shorten to first words
299 Select missings analysis to apply Select missings analysis to apply
300 Variables Variables
301 By outcome By outcome
302 Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
303 Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
304 Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
305 Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
306 Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -150,6 +150,7 @@
"Settings","Settings"
"The following error occured on determining correlations:","The following error occured on determining correlations:"
"We encountered the following error creating your report:","We encountered the following error creating your report:"
"No variable chosen for analysis","No variable chosen for analysis"
"No missing observations","No missing observations"
"There is a total of {p_miss} % missing observations.","There is a total of {p_miss} % missing observations."
"Median:","Median:"
@ -243,6 +244,7 @@
"Data characteristics table","Data characteristics table"
"The dataset without text variables","The dataset without text variables"
"Creating the table. Hold on for a moment..","Creating the table. Hold on for a moment.."
"Select variable to stratify analysis","Select variable to stratify analysis"
"Generating the report. Hold on for a moment..","Generating the report. Hold on for a moment.."
"We encountered the following error showing missingness:","We encountered the following error showing missingness:"
"We encountered the following error browsing your data:","We encountered the following error browsing your data:"
@ -294,16 +296,11 @@
"Words","Words"
"Shorten to first letters","Shorten to first letters"
"Shorten to first words","Shorten to first words"
"Select missings analysis to apply","Select missings analysis to apply"
"Variables","Variables"
"By outcome","By outcome"
"Missings across variables by the variable **'{input$missings_var}'**","Missings across variables by the variable **'{input$missings_var}'**"
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Missing vs non-missing observations in the variable **'{input$missings_var}'**"
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
"Calculating. Hold tight for a moment..","Calculating. Hold tight for a moment.."
"Overview of missing observations","Overview of missing observations"
"Analysis method for missingness overview","Analysis method for missingness overview"
"Overview of missings across variables","Overview of missings across variables"
"Overview of difference in variables by missing status in outcome","Overview of difference in variables by missing status in outcome"
"Select a variable for grouped overview","Select a variable for grouped overview"
"Select outcome variable for overview","Select outcome variable for overview"
"No outcome measure chosen","No outcome measure chosen"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."
"Include group differences","Include group differences"
"There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.","There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}."

1 en sw
150 Settings Settings
151 The following error occured on determining correlations: The following error occured on determining correlations:
152 We encountered the following error creating your report: We encountered the following error creating your report:
153 No variable chosen for analysis No variable chosen for analysis
154 No missing observations No missing observations
155 There is a total of {p_miss} % missing observations. There is a total of {p_miss} % missing observations.
156 Median: Median:
244 Data characteristics table Data characteristics table
245 The dataset without text variables The dataset without text variables
246 Creating the table. Hold on for a moment.. Creating the table. Hold on for a moment..
247 Select variable to stratify analysis Select variable to stratify analysis
248 Generating the report. Hold on for a moment.. Generating the report. Hold on for a moment..
249 We encountered the following error showing missingness: We encountered the following error showing missingness:
250 We encountered the following error browsing your data: We encountered the following error browsing your data:
296 Words Words
297 Shorten to first letters Shorten to first letters
298 Shorten to first words Shorten to first words
299 Select missings analysis to apply Select missings analysis to apply
300 Variables Variables
301 By outcome By outcome
302 Missings across variables by the variable **'{input$missings_var}'** Missings across variables by the variable **'{input$missings_var}'**
303 Missing vs non-missing observations in the variable **'{input$missings_var}'** Missing vs non-missing observations in the variable **'{input$missings_var}'**
304 Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random. Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.
305 Calculating. Hold tight for a moment.. Calculating. Hold tight for a moment..
306 Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. Overview of missing observations There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nnonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Analysis method for missingness overview Analysis method for missingness overview
Overview of missings across variables Overview of missings across variables
Overview of difference in variables by missing status in outcome Overview of difference in variables by missing status in outcome
Select a variable for grouped overview Select a variable for grouped overview
Select outcome variable for overview Select outcome variable for overview
No outcome measure chosen No outcome measure chosen
There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}. There is a significant difference in data missingness in {n_nonmcar} {ifelse(n_nonmcar==1,'variable','variables')} grouped by the selected outcome/grouping variable {outcome}.
Include group differences Include group differences

View file

@ -9,7 +9,6 @@ create_baseline(
...,
by.var,
add.p = FALSE,
add.diff = FALSE,
add.overall = FALSE,
theme = c("jama", "lancet", "nejm", "qjecon"),
detail_level = c("minimal", "extended")

View file

@ -8397,39 +8397,6 @@
"Maintainer": "Dean Attali <daattali@gmail.com>",
"Repository": "CRAN"
},
"smd": {
"Package": "smd",
"Version": "0.8.0",
"Source": "Repository",
"Type": "Package",
"Title": "Compute Standardized Mean Differences",
"Authors@R": "c(person(\"Bradley\", \"Saul\", role = c(\"aut\", \"cre\"), email = \"bradleysaul@fastmail.com\"), person(\"Alex\", \"Breskin\", role = c(\"ctb\"), email = \"alexbreskin@gmail.com\"), person(\"Catie\", \"Wiener\", role = c(\"ctb\"), email = \"cwiener@live.unc.edu\"), person(\"Matt\", \"Phelan\", role = c(\"ctb\"), email = \"mpphelan1@gmail.com\"), person(\"Daniel\", \"Sjoberg\", role = c(\"ctb\"), email = \"danield.sjoberg@gmail.com\"), person(\"Nuvan\", \"Rathnayaka\", role = c(\"ctb\"), email = \"nuvanrath@proton.me\"), person(\"Malcolm\", \"Barrett\", role = c(\"ctb\"), email = \"malcolmbarrett@gmail.com\") )",
"Description": "Computes standardized mean differences and confidence intervals for multiple data types based on Yang, D., & Dalton, J. E. (2012) <https://support.sas.com/resources/papers/proceedings12/335-2012.pdf>.",
"Imports": [
"MASS (>= 7.3-50)",
"methods (>= 3.5.1)"
],
"Suggests": [
"testthat",
"stddiff",
"tableone",
"knitr",
"dplyr",
"purrr",
"markdown",
"rmarkdown"
],
"License": "MIT + file LICENSE",
"URL": "https://bsaul.github.io/smd/",
"BugReports": "https://github.com/bsaul/smd/issues",
"Encoding": "UTF-8",
"RoxygenNote": "7.3.2",
"VignetteBuilder": "knitr",
"Repository": "CRAN",
"NeedsCompilation": "no",
"Author": "Bradley Saul [aut, cre], Alex Breskin [ctb], Catie Wiener [ctb], Matt Phelan [ctb], Daniel Sjoberg [ctb], Nuvan Rathnayaka [ctb], Malcolm Barrett [ctb]",
"Maintainer": "Bradley Saul <bradleysaul@fastmail.com>"
},
"sourcetools": {
"Package": "sourcetools",
"Version": "0.1.7-1",
@ -9187,52 +9154,6 @@
"Maintainer": "Davis Vaughan <davis@posit.co>",
"Repository": "CRAN"
},
"viridis": {
"Package": "viridis",
"Version": "0.6.5",
"Source": "Repository",
"Type": "Package",
"Title": "Colorblind-Friendly Color Maps for R",
"Date": "2024-01-28",
"Authors@R": "c( person(\"Simon\", \"Garnier\", email = \"garnier@njit.edu\", role = c(\"aut\", \"cre\")), person(\"Noam\", \"Ross\", email = \"noam.ross@gmail.com\", role = c(\"ctb\", \"cph\")), person(\"Bob\", \"Rudis\", email = \"bob@rud.is\", role = c(\"ctb\", \"cph\")), person(\"Marco\", \"Sciaini\", email = \"sciaini.marco@gmail.com\", role = c(\"ctb\", \"cph\")), person(\"Antônio Pedro\", \"Camargo\", role = c(\"ctb\", \"cph\")), person(\"Cédric\", \"Scherer\", email = \"scherer@izw-berlin.de\", role = c(\"ctb\", \"cph\")) )",
"Maintainer": "Simon Garnier <garnier@njit.edu>",
"Description": "Color maps designed to improve graph readability for readers with common forms of color blindness and/or color vision deficiency. The color maps are also perceptually-uniform, both in regular form and also when converted to black-and-white for printing. This package also contains 'ggplot2' bindings for discrete and continuous color and fill scales. A lean version of the package called 'viridisLite' that does not include the 'ggplot2' bindings can be found at <https://cran.r-project.org/package=viridisLite>.",
"License": "MIT + file LICENSE",
"Encoding": "UTF-8",
"Depends": [
"R (>= 2.10)",
"viridisLite (>= 0.4.0)"
],
"Imports": [
"ggplot2 (>= 1.0.1)",
"gridExtra"
],
"Suggests": [
"hexbin (>= 1.27.0)",
"scales",
"MASS",
"knitr",
"dichromat",
"colorspace",
"httr",
"mapproj",
"vdiffr",
"svglite (>= 1.2.0)",
"testthat",
"covr",
"rmarkdown",
"maps",
"terra"
],
"LazyData": "true",
"VignetteBuilder": "knitr",
"URL": "https://sjmgarnier.github.io/viridis/, https://github.com/sjmgarnier/viridis/",
"BugReports": "https://github.com/sjmgarnier/viridis/issues",
"RoxygenNote": "7.3.1",
"NeedsCompilation": "no",
"Author": "Simon Garnier [aut, cre], Noam Ross [ctb, cph], Bob Rudis [ctb, cph], Marco Sciaini [ctb, cph], Antônio Pedro Camargo [ctb, cph], Cédric Scherer [ctb, cph]",
"Repository": "CRAN"
},
"viridisLite": {
"Package": "viridisLite",
"Version": "0.4.2",