From 136480ca3d809b1b413727cc022d4af248a8d5ce Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Thu, 11 Sep 2025 15:21:04 +0200 Subject: [PATCH] updated translation strings --- R/correlations-module.R | 19 ++++-- R/data_plots.R | 62 ++++++++++---------- R/hosted_version.R | 2 +- inst/apps/FreesearchR/app.R | 87 ++++++++++++++++------------ inst/translations/translation_da.csv | 35 +++++++++++ inst/translations/translation_sw.csv | 35 +++++++++++ man/data-correlations.Rd | 24 ++++++-- 7 files changed, 184 insertions(+), 80 deletions(-) diff --git a/R/correlations-module.R b/R/correlations-module.R index 8330f2c..73ce254 100644 --- a/R/correlations-module.R +++ b/R/correlations-module.R @@ -16,9 +16,13 @@ data_correlations_ui <- function(id, ...) { #' +#' @param id id #' @param data data -#' @param color.main main color -#' @param color.sec secondary color +#' @param include.class character vector of classes to include. Default is NULL +#' @param cutoff numeric +#' @param warning_str Character string. Exposed to allow dynamic translations +#' @param warning_no_str Character string. Exposed to allow dynamic translations +#' @param and_strCharacter string. Exposed to allow dynamic translations #' @param ... arguments passed to toastui::datagrid #' #' @name data-correlations @@ -28,6 +32,9 @@ data_correlations_server <- function(id, data, include.class = NULL, cutoff = .7, + warning_str = i18n$t("The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."), + warning_no_str = i18n$t("No variables have a correlation measure above the threshold."), + and_str = i18n$t("and"), ...) { shiny::moduleServer( id = id, @@ -59,17 +66,17 @@ data_correlations_server <- function(id, shiny::req(cutoff) pairs <- correlation_pairs(rv$data(), threshold = cutoff()) - more <- ifelse(nrow(pairs) > 1, "from each pair ", "") + more <- ifelse(nrow(pairs) > 1, i18n$t("from each pair"), "") if (nrow(pairs) == 0) { - out <- glue::glue("No variables have a correlation measure above the threshold.") + out <- glue::glue(warning_no_str) } else { out <- pairs |> apply(1, \(.x){ - glue::glue("'{.x[1]}'x'{.x[2]}'({round(as.numeric(.x[3]),2)})") + glue::glue("'{.x[1]}'x'{.x[2]}' ({round(as.numeric(.x[3]),2)})") }) |> (\(.x){ - glue::glue("The following variable pairs are highly correlated: {sentence_paste(.x)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.") + glue::glue(warning_str) })() } out diff --git a/R/data_plots.R b/R/data_plots.R index f5b0def..b5597db 100644 --- a/R/data_plots.R +++ b/R/data_plots.R @@ -20,7 +20,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { title = "Creating plot", icon = bsicons::bs_icon("graph-up"), shiny::uiOutput(outputId = ns("primary")), - shiny::helpText('Only non-text variables are available for plotting. Go the "Data" to reclass data to plot.'), + shiny::helpText(i18n$t('Only non-text variables are available for plotting. Go the "Data" to reclass data to plot.')), shiny::tags$br(), shiny::uiOutput(outputId = ns("type")), shiny::uiOutput(outputId = ns("secondary")), @@ -28,19 +28,19 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { shiny::br(), shiny::actionButton( inputId = ns("act_plot"), - label = "Plot", + label = i18n$t("Plot"), width = "100%", icon = shiny::icon("palette"), disabled = FALSE ), - shiny::helpText('Adjust settings, then press "Plot".') + shiny::helpText(i18n$t('Adjust settings, then press "Plot".')) ), bslib::accordion_panel( title = "Download", icon = bsicons::bs_icon("download"), shinyWidgets::noUiSliderInput( inputId = ns("height_slide"), - label = "Plot height (mm)", + label = i18n$t("Plot height (mm)"), min = 50, max = 300, value = 100, @@ -58,7 +58,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { # ), shinyWidgets::noUiSliderInput( inputId = ns("width"), - label = "Plot width (mm)", + label = i18n$t("Plot width (mm)"), min = 50, max = 300, value = 100, @@ -68,7 +68,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { ), shiny::selectInput( inputId = ns("plot_type"), - label = "File format", + label = i18n$t("File format"), choices = list( "png", "tiff", @@ -82,7 +82,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { # Button shiny::downloadButton( outputId = ns("download_plot"), - label = "Download plot", + label = i18n$t("Download plot"), icon = shiny::icon("download") ) ) @@ -225,8 +225,8 @@ data_visuals_server <- function(id, inputId = ns("primary"), col_subset = names(data())[sapply(data(), data_type) != "text"], data = data, - placeholder = "Select variable", - label = "Response variable", + placeholder = i18n$t("Select variable"), + label = i18n$t("Response variable"), multiple = FALSE ) }) @@ -263,7 +263,7 @@ data_visuals_server <- function(id, vectorSelectInput( inputId = ns("type"), selected = NULL, - label = shiny::h4("Plot type"), + label = shiny::h4(i18n$t("Plot type")), choices = Reduce(c, plots_named), multiple = FALSE ) @@ -291,12 +291,12 @@ data_visuals_server <- function(id, inputId = ns("secondary"), data = data, selected = cols[1], - placeholder = "Please select", - label = if (isTRUE(rv$plot.params()[["secondary.multi"]])) "Additional variables" else "Secondary variable", + placeholder = i18n$t("Please select"), + label = if (isTRUE(rv$plot.params()[["secondary.multi"]])) i18n$t("Additional variables") else i18n$t("Secondary variable"), multiple = rv$plot.params()[["secondary.multi"]], maxItems = rv$plot.params()[["secondary.max"]], col_subset = cols, - none_label = "No variable" + none_label = i18n$t("No variable") ) }) @@ -305,8 +305,8 @@ data_visuals_server <- function(id, columnSelectInput( inputId = ns("tertiary"), data = data, - placeholder = "Please select", - label = "Grouping variable", + placeholder = i18n$t("Please select"), + label = i18n$t("Grouping variable"), multiple = FALSE, col_subset = c( "none", @@ -319,7 +319,7 @@ data_visuals_server <- function(id, input$secondary ) ), - none_label = "No stratification" + none_label = i18n$t("No stratification") ) }) @@ -335,7 +335,7 @@ data_visuals_server <- function(id, ter = input$tertiary ) - shiny::withProgress(message = "Drawing the plot. Hold tight for a moment..", { + shiny::withProgress(message = i18n$t("Drawing the plot. Hold tight for a moment.."), { rv$plot <- rlang::exec( create_plot, !!!append_list( @@ -362,7 +362,7 @@ data_visuals_server <- function(id, output$code_plot <- shiny::renderUI({ shiny::req(rv$code) - prismCodeBlock(paste0("#Plotting\n", rv$code)) + prismCodeBlock(paste0(i18n$t("#Plotting\n"), rv$code)) }) shiny::observeEvent( @@ -407,7 +407,7 @@ data_visuals_server <- function(id, plot <- rv$plot[[1]] } # browser() - shiny::withProgress(message = "Drawing the plot. Hold on for a moment..", { + shiny::withProgress(message = i18n$t("Drawing the plot. Hold on for a moment.."), { ggplot2::ggsave( filename = file, plot = plot, @@ -486,8 +486,8 @@ supported_plots <- function() { list( plot_hbars = list( fun = "plot_hbars", - descr = "Stacked horizontal bars", - note = "A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars", + descr = i18n$t("Stacked horizontal bars"), + note = i18n$t("A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -496,8 +496,8 @@ supported_plots <- function() { ), plot_violin = list( fun = "plot_violin", - descr = "Violin plot", - note = "A modern alternative to the classic boxplot to visualise data distribution", + descr = i18n$t("Violin plot"), + note = i18n$t("A modern alternative to the classic boxplot to visualise data distribution"), primary.type = c("datatime", "continuous", "dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -514,8 +514,8 @@ supported_plots <- function() { # ), plot_sankey = list( fun = "plot_sankey", - descr = "Sankey plot", - note = "A way of visualising change between groups", + descr = i18n$t("Sankey plot"), + note = i18n$t("A way of visualising change between groups"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -524,8 +524,8 @@ supported_plots <- function() { ), plot_scatter = list( fun = "plot_scatter", - descr = "Scatter plot", - note = "A classic way of showing the association between to variables", + descr = i18n$t("Scatter plot"), + note = i18n$t("A classic way of showing the association between to variables"), primary.type = c("datatime", "continuous"), secondary.type = c("datatime", "continuous", "categorical"), secondary.multi = FALSE, @@ -534,8 +534,8 @@ supported_plots <- function() { ), plot_box = list( fun = "plot_box", - descr = "Box plot", - note = "A classic way to plot data distribution by groups", + descr = i18n$t("Box plot"), + note = i18n$t("A classic way to plot data distribution by groups"), primary.type = c("datatime", "continuous", "dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -544,8 +544,8 @@ supported_plots <- function() { ), plot_euler = list( fun = "plot_euler", - descr = "Euler diagram", - note = "Generate area-proportional Euler diagrams to display set relationships", + descr = i18n$t("Euler diagram"), + note = i18n$t("Generate area-proportional Euler diagrams to display set relationships"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = TRUE, diff --git a/R/hosted_version.R b/R/hosted_version.R index 9108a04..d8b66a9 100644 --- a/R/hosted_version.R +++ b/R/hosted_version.R @@ -1 +1 @@ -hosted_version <- function()'v25.8.3-250910' +hosted_version <- function()'v25.8.3-250911' diff --git a/inst/apps/FreesearchR/app.R b/inst/apps/FreesearchR/app.R index 8fcfe4a..95f287e 100644 --- a/inst/apps/FreesearchR/app.R +++ b/inst/apps/FreesearchR/app.R @@ -228,9 +228,13 @@ data_correlations_ui <- function(id, ...) { #' +#' @param id id #' @param data data -#' @param color.main main color -#' @param color.sec secondary color +#' @param include.class character vector of classes to include. Default is NULL +#' @param cutoff numeric +#' @param warning_str Character string. Exposed to allow dynamic translations +#' @param warning_no_str Character string. Exposed to allow dynamic translations +#' @param and_strCharacter string. Exposed to allow dynamic translations #' @param ... arguments passed to toastui::datagrid #' #' @name data-correlations @@ -240,6 +244,9 @@ data_correlations_server <- function(id, data, include.class = NULL, cutoff = .7, + warning_str = i18n$t("The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent."), + warning_no_str = i18n$t("No variables have a correlation measure above the threshold."), + and_str = i18n$t("and"), ...) { shiny::moduleServer( id = id, @@ -271,17 +278,17 @@ data_correlations_server <- function(id, shiny::req(cutoff) pairs <- correlation_pairs(rv$data(), threshold = cutoff()) - more <- ifelse(nrow(pairs) > 1, "from each pair ", "") + more <- ifelse(nrow(pairs) > 1, i18n$t("from each pair"), "") if (nrow(pairs) == 0) { - out <- glue::glue("No variables have a correlation measure above the threshold.") + out <- glue::glue(warning_no_str) } else { out <- pairs |> apply(1, \(.x){ - glue::glue("'{.x[1]}'x'{.x[2]}'({round(as.numeric(.x[3]),2)})") + glue::glue("'{.x[1]}'x'{.x[2]}' ({round(as.numeric(.x[3]),2)})") }) |> (\(.x){ - glue::glue("The following variable pairs are highly correlated: {sentence_paste(.x)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.") + glue::glue(warning_str) })() } out @@ -1633,7 +1640,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { title = "Creating plot", icon = bsicons::bs_icon("graph-up"), shiny::uiOutput(outputId = ns("primary")), - shiny::helpText('Only non-text variables are available for plotting. Go the "Data" to reclass data to plot.'), + shiny::helpText(i18n$t('Only non-text variables are available for plotting. Go the "Data" to reclass data to plot.')), shiny::tags$br(), shiny::uiOutput(outputId = ns("type")), shiny::uiOutput(outputId = ns("secondary")), @@ -1641,19 +1648,19 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { shiny::br(), shiny::actionButton( inputId = ns("act_plot"), - label = "Plot", + label = i18n$t("Plot"), width = "100%", icon = shiny::icon("palette"), disabled = FALSE ), - shiny::helpText('Adjust settings, then press "Plot".') + shiny::helpText(i18n$t('Adjust settings, then press "Plot".')) ), bslib::accordion_panel( title = "Download", icon = bsicons::bs_icon("download"), shinyWidgets::noUiSliderInput( inputId = ns("height_slide"), - label = "Plot height (mm)", + label = i18n$t("Plot height (mm)"), min = 50, max = 300, value = 100, @@ -1671,7 +1678,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { # ), shinyWidgets::noUiSliderInput( inputId = ns("width"), - label = "Plot width (mm)", + label = i18n$t("Plot width (mm)"), min = 50, max = 300, value = 100, @@ -1681,7 +1688,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { ), shiny::selectInput( inputId = ns("plot_type"), - label = "File format", + label = i18n$t("File format"), choices = list( "png", "tiff", @@ -1695,7 +1702,7 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { # Button shiny::downloadButton( outputId = ns("download_plot"), - label = "Download plot", + label = i18n$t("Download plot"), icon = shiny::icon("download") ) ) @@ -1838,8 +1845,8 @@ data_visuals_server <- function(id, inputId = ns("primary"), col_subset = names(data())[sapply(data(), data_type) != "text"], data = data, - placeholder = "Select variable", - label = "Response variable", + placeholder = i18n$t("Select variable"), + label = i18n$t("Response variable"), multiple = FALSE ) }) @@ -1876,7 +1883,7 @@ data_visuals_server <- function(id, vectorSelectInput( inputId = ns("type"), selected = NULL, - label = shiny::h4("Plot type"), + label = shiny::h4(i18n$t("Plot type")), choices = Reduce(c, plots_named), multiple = FALSE ) @@ -1904,12 +1911,12 @@ data_visuals_server <- function(id, inputId = ns("secondary"), data = data, selected = cols[1], - placeholder = "Please select", - label = if (isTRUE(rv$plot.params()[["secondary.multi"]])) "Additional variables" else "Secondary variable", + placeholder = i18n$t("Please select"), + label = if (isTRUE(rv$plot.params()[["secondary.multi"]])) i18n$t("Additional variables") else i18n$t("Secondary variable"), multiple = rv$plot.params()[["secondary.multi"]], maxItems = rv$plot.params()[["secondary.max"]], col_subset = cols, - none_label = "No variable" + none_label = i18n$t("No variable") ) }) @@ -1918,8 +1925,8 @@ data_visuals_server <- function(id, columnSelectInput( inputId = ns("tertiary"), data = data, - placeholder = "Please select", - label = "Grouping variable", + placeholder = i18n$t("Please select"), + label = i18n$t("Grouping variable"), multiple = FALSE, col_subset = c( "none", @@ -1932,7 +1939,7 @@ data_visuals_server <- function(id, input$secondary ) ), - none_label = "No stratification" + none_label = i18n$t("No stratification") ) }) @@ -1948,7 +1955,7 @@ data_visuals_server <- function(id, ter = input$tertiary ) - shiny::withProgress(message = "Drawing the plot. Hold tight for a moment..", { + shiny::withProgress(message = i18n$t("Drawing the plot. Hold tight for a moment.."), { rv$plot <- rlang::exec( create_plot, !!!append_list( @@ -1975,7 +1982,7 @@ data_visuals_server <- function(id, output$code_plot <- shiny::renderUI({ shiny::req(rv$code) - prismCodeBlock(paste0("#Plotting\n", rv$code)) + prismCodeBlock(paste0(i18n$t("#Plotting\n"), rv$code)) }) shiny::observeEvent( @@ -2020,7 +2027,7 @@ data_visuals_server <- function(id, plot <- rv$plot[[1]] } # browser() - shiny::withProgress(message = "Drawing the plot. Hold on for a moment..", { + shiny::withProgress(message = i18n$t("Drawing the plot. Hold on for a moment.."), { ggplot2::ggsave( filename = file, plot = plot, @@ -2099,8 +2106,8 @@ supported_plots <- function() { list( plot_hbars = list( fun = "plot_hbars", - descr = "Stacked horizontal bars", - note = "A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars", + descr = i18n$t("Stacked horizontal bars"), + note = i18n$t("A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -2109,8 +2116,8 @@ supported_plots <- function() { ), plot_violin = list( fun = "plot_violin", - descr = "Violin plot", - note = "A modern alternative to the classic boxplot to visualise data distribution", + descr = i18n$t("Violin plot"), + note = i18n$t("A modern alternative to the classic boxplot to visualise data distribution"), primary.type = c("datatime", "continuous", "dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -2127,8 +2134,8 @@ supported_plots <- function() { # ), plot_sankey = list( fun = "plot_sankey", - descr = "Sankey plot", - note = "A way of visualising change between groups", + descr = i18n$t("Sankey plot"), + note = i18n$t("A way of visualising change between groups"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -2137,8 +2144,8 @@ supported_plots <- function() { ), plot_scatter = list( fun = "plot_scatter", - descr = "Scatter plot", - note = "A classic way of showing the association between to variables", + descr = i18n$t("Scatter plot"), + note = i18n$t("A classic way of showing the association between to variables"), primary.type = c("datatime", "continuous"), secondary.type = c("datatime", "continuous", "categorical"), secondary.multi = FALSE, @@ -2147,8 +2154,8 @@ supported_plots <- function() { ), plot_box = list( fun = "plot_box", - descr = "Box plot", - note = "A classic way to plot data distribution by groups", + descr = i18n$t("Box plot"), + note = i18n$t("A classic way to plot data distribution by groups"), primary.type = c("datatime", "continuous", "dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = FALSE, @@ -2157,8 +2164,8 @@ supported_plots <- function() { ), plot_euler = list( fun = "plot_euler", - descr = "Euler diagram", - note = "Generate area-proportional Euler diagrams to display set relationships", + descr = i18n$t("Euler diagram"), + note = i18n$t("Generate area-proportional Euler diagrams to display set relationships"), primary.type = c("dichotomous", "categorical"), secondary.type = c("dichotomous", "categorical"), secondary.multi = TRUE, @@ -4061,7 +4068,7 @@ simple_snake <- function(data){ #### Current file: /Users/au301842/FreesearchR/R//hosted_version.R ######## -hosted_version <- function()'v25.8.3-250910' +hosted_version <- function()'v25.8.3-250911' ######## @@ -11583,7 +11590,11 @@ server <- function(input, output, session) { ) shiny::observeEvent( + list( rv_validations$var_filter, + rv_validations$obs_filter, + rv_validations$missings + ), { validation_server( id = "validation_all", diff --git a/inst/translations/translation_da.csv b/inst/translations/translation_da.csv index 7db539e..eeb060c 100644 --- a/inst/translations/translation_da.csv +++ b/inst/translations/translation_da.csv @@ -108,3 +108,38 @@ "{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} har {n} observationer og {n_var} variabler, med {n_complete} ({p_complete} %) komplette cases." "Prepare","Forbered" "At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included." +"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent." +"No variables have a correlation measure above the threshold.","Ingen variabler er korrelerede over den angivne tærskelværdi." +"and","og" +"from each pair","fra hvert par" +"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot." +"Plot","Plot" +"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""." +"Plot height (mm)","Plot height (mm)" +"Plot width (mm)","Plot width (mm)" +"File format","File format" +"Download plot","Download plot" +"Select variable","Select variable" +"Response variable","Response variable" +"Plot type","Plot type" +"Please select","Please select" +"Additional variables","Additional variables" +"Secondary variable","Secondary variable" +"No variable","No variable" +"Grouping variable","Grouping variable" +"No stratification","No stratification" +"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.." +"#Plotting\n","#Plotting\n" +"Drawing the plot. Hold on for a moment..","Drawing the plot. Hold on for a moment.." +"Stacked horizontal bars","Stacked horizontal bars" +"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars" +"Violin plot","Violin plot" +"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution" +"Sankey plot","Sankey plot" +"A way of visualising change between groups","A way of visualising change between groups" +"Scatter plot","Scatter plot" +"A classic way of showing the association between to variables","A classic way of showing the association between to variables" +"Box plot","Box plot" +"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups" +"Euler diagram","Euler diagram" +"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships" diff --git a/inst/translations/translation_sw.csv b/inst/translations/translation_sw.csv index 48009b5..d1c447a 100644 --- a/inst/translations/translation_sw.csv +++ b/inst/translations/translation_sw.csv @@ -108,3 +108,38 @@ "{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases." "Prepare","Prepare" "At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included." +"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent." +"No variables have a correlation measure above the threshold.","No variables have a correlation measure above the threshold." +"and","and" +"from each pair","from each pair" +"Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot.","Only non-text variables are available for plotting. Go the ""Data"" to reclass data to plot." +"Plot","Plot" +"Adjust settings, then press ""Plot"".","Adjust settings, then press ""Plot""." +"Plot height (mm)","Plot height (mm)" +"Plot width (mm)","Plot width (mm)" +"File format","File format" +"Download plot","Download plot" +"Select variable","Select variable" +"Response variable","Response variable" +"Plot type","Plot type" +"Please select","Please select" +"Additional variables","Additional variables" +"Secondary variable","Secondary variable" +"No variable","No variable" +"Grouping variable","Grouping variable" +"No stratification","No stratification" +"Drawing the plot. Hold tight for a moment..","Drawing the plot. Hold tight for a moment.." +"#Plotting\n","#Plotting\n" +"Drawing the plot. Hold on for a moment..","Drawing the plot. Hold on for a moment.." +"Stacked horizontal bars","Stacked horizontal bars" +"A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars","A classical way of visualising the distribution of an ordinal scale like the modified Ranking Scale and known as Grotta bars" +"Violin plot","Violin plot" +"A modern alternative to the classic boxplot to visualise data distribution","A modern alternative to the classic boxplot to visualise data distribution" +"Sankey plot","Sankey plot" +"A way of visualising change between groups","A way of visualising change between groups" +"Scatter plot","Scatter plot" +"A classic way of showing the association between to variables","A classic way of showing the association between to variables" +"Box plot","Box plot" +"A classic way to plot data distribution by groups","A classic way to plot data distribution by groups" +"Euler diagram","Euler diagram" +"Generate area-proportional Euler diagrams to display set relationships","Generate area-proportional Euler diagrams to display set relationships" diff --git a/man/data-correlations.Rd b/man/data-correlations.Rd index df65126..29dbfc3 100644 --- a/man/data-correlations.Rd +++ b/man/data-correlations.Rd @@ -8,18 +8,34 @@ \usage{ data_correlations_ui(id, ...) -data_correlations_server(id, data, include.class = NULL, cutoff = 0.7, ...) +data_correlations_server( + id, + data, + include.class = NULL, + cutoff = 0.7, + warning_str = + i18n$t("The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\\nConsider excluding one {more}from the dataset to ensure variables are independent."), + warning_no_str = i18n$t("No variables have a correlation measure above the threshold."), + and_str = i18n$t("and"), + ... +) } \arguments{ -\item{id}{Module id. (Use 'ns("id")')} +\item{id}{id} \item{...}{arguments passed to toastui::datagrid} \item{data}{data} -\item{color.main}{main color} +\item{include.class}{character vector of classes to include. Default is NULL} -\item{color.sec}{secondary color} +\item{cutoff}{numeric} + +\item{warning_str}{Character string. Exposed to allow dynamic translations} + +\item{warning_no_str}{Character string. Exposed to allow dynamic translations} + +\item{and_strCharacter}{string. Exposed to allow dynamic translations} } \value{ Shiny ui module