From 81a1a2a870f1d821d5c7f82d7817fb957a0ab2a0 Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Mon, 6 Oct 2025 12:57:50 +0200 Subject: [PATCH 1/4] feat: new default label for horizontal stacked plot --- R/plot_hbar.R | 6 ++++-- man/vertical_stacked_bars.Rd | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/R/plot_hbar.R b/R/plot_hbar.R index 5e13a8e6..5e71d745 100644 --- a/R/plot_hbar.R +++ b/R/plot_hbar.R @@ -34,7 +34,8 @@ vertical_stacked_bars <- function(data, t.size = 10, l.color = "black", l.size = .5, - draw.lines = TRUE) { + draw.lines = TRUE, + label.str="{n}\n{round(100 * p,0)}%") { if (is.null(group)) { df.table <- data[c(score, group, strata)] |> dplyr::mutate("All" = 1) |> @@ -79,7 +80,8 @@ vertical_stacked_bars <- function(data, y = p_prev + 0.49 * p, color = as.numeric(score) > contrast_cut, # label = paste0(sprintf("%2.0f", 100 * p),"%"), - label = sprintf("%2.0f", 100 * p) + # label = sprintf("%2.0f", 100 * p) + label = glue::glue(label.str) ) ) + ggplot2::labs(fill = score_label) + diff --git a/man/vertical_stacked_bars.Rd b/man/vertical_stacked_bars.Rd index af09a99b..52f3c5c0 100644 --- a/man/vertical_stacked_bars.Rd +++ b/man/vertical_stacked_bars.Rd @@ -12,7 +12,8 @@ vertical_stacked_bars( t.size = 10, l.color = "black", l.size = 0.5, - draw.lines = TRUE + draw.lines = TRUE, + label.str = "{n}\\n{round(100 * p,0)}\%" ) } \arguments{ From 346bc7edf7ed6b1b9516eea629b2ef2e5360c34f Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Tue, 7 Oct 2025 12:18:23 +0200 Subject: [PATCH 2/4] feat: Better .rds import that will import the first element as data.frame if a list-type element is supplied. --- R/import-file-ext.R | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/R/import-file-ext.R b/R/import-file-ext.R index e0f00b63..c79cc9ad 100644 --- a/R/import-file-ext.R +++ b/R/import-file-ext.R @@ -504,9 +504,20 @@ import_dta <- function(file) { #' @export #' import_rds <- function(file) { - readr::read_rds( + out <- readr::read_rds( file = file ) + + if (is.data.frame(out)){ + out + } else if (is.vector(out) && !is.null(dim(out))){ + ## If the data is a simple vector (simple test), it is coerced to a data.frame + as.data.frame(out) + } else { + ## If not a data.frame and not a vector (probably a list of elements) + ## Flattened to ensure no nested lists + as.data.frame(purrr::list_flatten(out)[[1]]) + } } #' @title Create a select input control with icon(s) From 8db847b43d9fb9fa863edcae521abfb2c1c13629 Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Tue, 7 Oct 2025 13:59:36 +0200 Subject: [PATCH 3/4] latest version render --- CITATION.cff | 2 +- DESCRIPTION | 2 +- NAMESPACE | 1 + NEWS.md | 11 ++ R/app_version.R | 2 +- R/hosted_version.R | 2 +- R/import-file-ext.R | 49 +++++++- R/sysdata.rda | Bin 2804 -> 2851 bytes R/ui_elements.R | 5 +- SESSION.md | 53 ++++----- app_docker/app.R | 123 +++++++++++++++++--- app_docker/renv.lock | 3 +- app_docker/translations/translation_da.csv | 3 + app_docker/translations/translation_sw.csv | 3 + app_docker/www/intro_da.html | 15 ++- app_docker/www/intro_da.md | 6 +- app_docker/www/intro_sw.html | 14 ++- app_docker/www/intro_sw.md | 6 +- inst/apps/FreesearchR/app.R | 125 +++++++++++++++++---- inst/apps/FreesearchR/www/intro_da.html | 15 ++- inst/apps/FreesearchR/www/intro_da.md | 6 +- inst/apps/FreesearchR/www/intro_sw.html | 14 ++- inst/apps/FreesearchR/www/intro_sw.md | 6 +- inst/translations/translation_da.csv | 3 + inst/translations/translation_sw.csv | 3 + man/import-file.Rd | 3 +- man/limit_data_size.Rd | 26 +++++ renv.lock | 3 +- 28 files changed, 397 insertions(+), 107 deletions(-) create mode 100644 man/limit_data_size.Rd diff --git a/CITATION.cff b/CITATION.cff index be088f29..1bbe1103 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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.10.1 +version: 25.10.2 doi: 10.5281/zenodo.14527429 identifiers: - type: url diff --git a/DESCRIPTION b/DESCRIPTION index 9eeddb70..f593083a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: FreesearchR Title: Easy data analysis for clinicians -Version: 25.10.1 +Version: 25.10.2 Authors@R: c( person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7559-1154")), diff --git a/NAMESPACE b/NAMESPACE index 03405295..b4592f0b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -78,6 +78,7 @@ export(is_identical_to_previous) export(is_valid_redcap_url) export(is_valid_token) export(launch_FreesearchR) +export(limit_data_size) export(limit_log) export(line_break) export(list_allowed_operations) diff --git a/NEWS.md b/NEWS.md index 893a5bb9..05e1263a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,14 @@ +# FreesearchR 25.10.2 - DEV + +*NEW* Improvements to translations with more strings having been translated. + +*NEW* More detailed label for the stacked horizontal bar plot. + +*NEW* Better .rds import that will import the first element as data.frame if a list-type element is supplied. + +*NEW* A limit to the imported dataset size was added to ensure performance on hosted version. The data is limited to 100.000 cells by dropping rows to fit. The vast majority of users will never experience this capping, but adds a layer of security and stability to the hosting framework. + + # FreesearchR 25.10.1 *NEW* Improvements to translations with more strings having been translated. diff --git a/R/app_version.R b/R/app_version.R index d394d1ea..6dde03ee 100644 --- a/R/app_version.R +++ b/R/app_version.R @@ -1 +1 @@ -app_version <- function()'25.10.1' +app_version <- function()'25.10.2' diff --git a/R/hosted_version.R b/R/hosted_version.R index f18af72a..e141329f 100644 --- a/R/hosted_version.R +++ b/R/hosted_version.R @@ -1 +1 @@ -hosted_version <- function()'v25.10.1-251002' +hosted_version <- function()'v25.10.2-251007' diff --git a/R/import-file-ext.R b/R/import-file-ext.R index c79cc9ad..f9b0c9d3 100644 --- a/R/import-file-ext.R +++ b/R/import-file-ext.R @@ -144,7 +144,7 @@ import_file_ui <- function(id, shiny::tags$b(i18n$t("No file selected.")), # shiny::textOutput(ns("trans_format_text")), # This is the easiest solution, though not gramatically perfect - i18n$t("You can choose between these file types:"), paste(file_extensions,collapse=', '), + i18n$t("You can choose between these file types:"), paste(file_extensions, collapse = ", "), # sprintf("You can import %s files", paste(file_extensions, collapse = ", ")), dismissible = TRUE ) @@ -177,7 +177,8 @@ import_file_server <- function(id, show_data_in = c("popup", "modal"), trigger_return = c("button", "change"), return_class = c("data.frame", "data.table", "tbl_df", "raw"), - reset = reactive(NULL)) { + reset = reactive(NULL), + limit=100000) { read_fns <- list( ods = "import_ods", dta = "import_dta", @@ -296,6 +297,10 @@ import_file_server <- function(id, extra = if (isTRUE(input$preview_data)) i18n$t("First five rows are shown below:") ) ) + + ## As a protective measure, the dataset size is capped at cell limit + imported <- limit_data_size(imported,limit = limit) + temporary_rv$status <- "success" temporary_rv$data <- imported temporary_rv$name <- input$file$name @@ -508,9 +513,9 @@ import_rds <- function(file) { file = file ) - if (is.data.frame(out)){ + if (is.data.frame(out)) { out - } else if (is.vector(out) && !is.null(dim(out))){ + } else if (is.vector(out) && !is.null(dim(out))) { ## If the data is a simple vector (simple test), it is coerced to a data.frame as.data.frame(out) } else { @@ -621,3 +626,39 @@ import_file_demo_app <- function() { } shiny::shinyApp(ui, server) } + + +#' Limit the allowed data set size by number of cells +#' +#' @description +#' This function may act to guard a hosted app against very large data sets in +#' addition to the file size limitations. +#' The function will limit the data set by dropping rows. +#' +#' +#' @param data data.frame +#' @param limit cell number limit. Default is NULL. +#' +#' @returns data.frame +#' @export +#' +#' @examples +#' prod(dim(mtcars)) +#' limit_data_size(mtcars) +#' limit_data_size(mtcars,100) +limit_data_size <- function(data, limit = NULL) { + ## Add security to only allow dataset of 100.000 cells + ## Ideally this should only go for the hosted version + + if (is.null(limit)){ + return(data) + } + + data_dim <- dim(data) + + if (prod(data_dim) > limit) { + head(data, floor(limit / data_dim[2])) + } else { + data + } +} diff --git a/R/sysdata.rda b/R/sysdata.rda index 799e56842342a5d191975673894bfb9e32972c1a..5b25ea88076b7ba4ee7653c126bce0b36f504bce 100644 GIT binary patch literal 2851 zcmV+;3*7WVT4*^jL0KkKS!**eGXNVW|HA+OXazw3|KNXb-@w2B|L{Nn06+)<;0(VP z6Ra*hKyU)RfOSBpP4n-dp-MdiN+GF;CLy7sVFrmk38$pdM~Ui&C#3ZQ)EOAjr1d>O z)jXJi1w9&5N2GpPfu$M#Ul^|i>wM{H)$xxGe*i_;c*U5pors@mzL%WzTLl&_qD@F zUQovd?W<+?&h$D>0v-!JiHjQ6wTMn*O@_iI#>#A?;remL{UBqh>EF9j2-7sy+1^tk z8RvVYT=veVC@wN&G(v2Rr>05A7=p}mbh_otuU9S)-7w=A(a^1~Wf(04 zO{fUyL{P(rXFEqN>yr2#$SNtgC<4R*0zrWxApk^K0ZNFXq5Fy`<$$ObZOSs{b4Vl= z1}Lf`jAAIE0v(>`bo9ESj>JF{Z+CZJ+b-hm`t@Q8ISX`XFcFdvh^jU8S ztWij?VgkslL_}hO#vr0FQYwogtQ3l%qMY4sI^VT7>L+UwX`J?39cKIMH_4>d3d3>P z)w^Mi6%^7+-qnV0YnzyGIBhr4Vw*7F;&5f*yM@P28>W;QHNMy;s40zCI6B~P+Cbb` z_sCRt!kZ?IS-F;SZ^@fAG|9|44Jy+X7!^45Dn+!=Koe-&4hqpTGEJ+IP1GopS9BT~ zC>Z9ENM`9UcUa)u&Ll-;M&{kl=3%rJV!W%!oP=q^!h|XtIk*&ac<{jyYM$*$u*4DxIvH;v0wtEl|({K;G==mRVXXBL#z^8A!%V#R9ZN5hqVoRN(B(2~4e#6A2vx1{iuk=(JKz zkqA9WZj8`#FrLJNLS`98lavuKOIt2ohq+BVNJ?cO5K6o)YTD-qhE2`QH!Ha( zLkc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(~ z0xQh*-?R_VV?E_3k_S6g{qXf{5RQc+SGH+iiPT;Zu;?uA`)5vWzWg&53AW15yBy(i z0KK|UN<=t(wmWZdJGRj^ah=8E{3de>NvjH`r_$P))vi)XvnldsQaZY=Yqs;p;q zNYmIab}O~&6eJQQJAMuzOAWqZBo_8rvG%pN*E!7VCw5qs<{?VW#6$qpZ3~J8FW?x@V~jP+QD#-n$0JlU zb(T*dE6H?DrR*sU_0sdOsB%xL*(f7Q27;?aIu_`^HwSPX#06@hMFB+t%w5S8;X*?C GF limit) { + head(data, floor(limit / data_dim[2])) + } else { + data + } +} + + ######## #### Current file: /Users/au301842/FreesearchR/R//launch_FreesearchR.R ######## @@ -5520,7 +5572,8 @@ vertical_stacked_bars <- function(data, t.size = 10, l.color = "black", l.size = .5, - draw.lines = TRUE) { + draw.lines = TRUE, + label.str="{n}\n{round(100 * p,0)}%") { if (is.null(group)) { df.table <- data[c(score, group, strata)] |> dplyr::mutate("All" = 1) |> @@ -5565,7 +5618,8 @@ vertical_stacked_bars <- function(data, y = p_prev + 0.49 * p, color = as.numeric(score) > contrast_cut, # label = paste0(sprintf("%2.0f", 100 * p),"%"), - label = sprintf("%2.0f", 100 * p) + # label = sprintf("%2.0f", 100 * p) + label = glue::glue(label.str) ) ) + ggplot2::labs(fill = score_label) + @@ -9019,7 +9073,7 @@ ui_elements <- function(selection) { "Yes" = "yes" ) ), - shiny::helpText("Option to perform statistical comparisons between strata in baseline table.") + shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")) ), shiny::br(), shiny::br(), @@ -9029,7 +9083,8 @@ ui_elements <- function(selection) { width = "100%", icon = shiny::icon("calculator"), disabled = TRUE - ) + ), + shiny::helpText(i18n$t("Press 'Evaluate' to create the comparison table.")) ) ) ), @@ -11427,9 +11482,9 @@ server <- function(input, output, session) { files.to.keep <- list.files("www/") ## This works in a minimal working example, but not here. Will investigate. -# shinyjs::runjs("var language = window.navigator.userLanguage || window.navigator.language; -# var shortLang = language.split('-')[0]; -# Shiny.onInputChange('browser_lang', shortLang);") + # shinyjs::runjs("var language = window.navigator.userLanguage || window.navigator.language; + # var shortLang = language.split('-')[0]; + # Shiny.onInputChange('browser_lang', shortLang);") load_data() @@ -11563,6 +11618,7 @@ server <- function(input, output, session) { output$intro_text <- renderUI(includeHTML(i18n$t("www/intro.html"))) }) + ## This is not working but kept to try to solve if deemed necessary shiny::observe( output$footer_text_div <- renderUI({ shiny::tags$footer( @@ -11629,7 +11685,9 @@ server <- function(input, output, session) { id = "file_import", show_data_in = "popup", trigger_return = "change", - return_class = "data.frame" + return_class = "data.frame", + ## Added data.frame size limit (number of cells), rows are dropped to fit + limit = 100000 ) shiny::observeEvent(data_file$data(), { @@ -11677,7 +11735,7 @@ server <- function(input, output, session) { modal_visual_summary( id = "initial_summary", footer = NULL, - size = "xl",title = i18n$t("Data classes and missing observations") + size = "xl", title = i18n$t("Data classes and missing observations") ) }, error = function(err) { @@ -12275,6 +12333,19 @@ server <- function(input, output, session) { data_description(rv$list$data, data_text = "The dataset without text variables") }) + ## Only allow evaluation if the dataset has fewer then 50 variables + ## + + # shiny::observeEvent( + # list( + # rv$list$data + # ), + # { + # shiny::req(rv$list$data) + # + # }) + + shiny::observeEvent( list( input$act_eval @@ -12289,9 +12360,25 @@ server <- function(input, output, session) { add.overall = TRUE ) - shiny::withProgress(message = "Creating the table. Hold on for a moment..", { - rv$list$table1 <- rlang::exec(create_baseline, !!!append_list(rv$list$data, parameters, "data")) - }) + + # Attempt to introduce error on analysing too large dataset + # tryCatch( + # { + # if (ncol(rv$list$data) > 10) { + # n_col <- ncol(rv$list$data) + # # stop(glue::glue(i18n$t("The data includes {n_col} variables. Please limit to 100."))) + # print("Please limit to 100.") + # } else { + shiny::withProgress(message = "Creating the table. Hold on for a moment..", { + rv$list$table1 <- rlang::exec(create_baseline, !!!append_list(rv$list$data, parameters, "data")) + }) + # } + # }, + # error = function(err) { + # showNotification(err, type = "err") + # } + # ) + rv$code$table1 <- glue::glue("FreesearchR::create_baseline(df,{list2str(parameters)})") } diff --git a/app_docker/renv.lock b/app_docker/renv.lock index 49bb63e6..548bff24 100644 --- a/app_docker/renv.lock +++ b/app_docker/renv.lock @@ -1201,7 +1201,8 @@ "License": "Unlimited", "NeedsCompilation": "no", "Author": "Angelo Canty [aut] (author of original code for S), Brian Ripley [aut, trl] (conversion to R, maintainer 1999--2022, author of parallel support), Alessandra R. Brazzale [ctb, cre] (minor bug fixes)", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "brio": { "Package": "brio", diff --git a/app_docker/translations/translation_da.csv b/app_docker/translations/translation_da.csv index 13ab3733..2d9b39b2 100644 --- a/app_docker/translations/translation_da.csv +++ b/app_docker/translations/translation_da.csv @@ -244,3 +244,6 @@ "Select checks to plot","Select checks to plot" "Multivariable regression model checks","Multivariable regression model checks" "Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}" +"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table." +"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table." +"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100." diff --git a/app_docker/translations/translation_sw.csv b/app_docker/translations/translation_sw.csv index 42613fca..aa1a4716 100644 --- a/app_docker/translations/translation_sw.csv +++ b/app_docker/translations/translation_sw.csv @@ -244,3 +244,6 @@ "Select checks to plot","Select checks to plot" "Multivariable regression model checks","Multivariable regression model checks" "Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}" +"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table." +"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table." +"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100." diff --git a/app_docker/www/intro_da.html b/app_docker/www/intro_da.html index 5df8d8b3..e372d960 100644 --- a/app_docker/www/intro_da.html +++ b/app_docker/www/intro_da.html @@ -8,15 +8,18 @@ værktøj til databehandling og -analyse. Har du brug for mere avancerede værktøjer, så kan du starte FreesearchR og senere selv hente R og RStudio eller lignende.

+

Vi arbejder hårdt på at introducere en komplet oversættelse til +dansk. Hvis du har lyst til at bidrage, er du velkommen til at kontakte +os på info@freesearchr.org.

Herunder kan du helt kort se, hvad du kan bruge FreesearchR til:

    -
  1. Import data from a spreadsheet/file on your -machine, directly from a REDCap server, try -it with sample data or access data directly if run in R -locally

  2. -
  3. Prepare data for analysis by filtering data, -modifying variables or create new variables

  4. +
  5. Importér data fra regneark/fil på din enhed, +direkte fra en REDCap-server, afprøv med +eksempel-data eller tilgå data direkte hvis du +afvikler i R lokalt

  6. +
  7. Forbered data til analys ved at filtrere, ændre +variabler eller opret helt nye variabler

  8. Evaluate data using descriptive analyses methods and inspect cross-correlations as well as missing observations

  9. Visualise data by creating simple, clean plots for diff --git a/app_docker/www/intro_da.md b/app_docker/www/intro_da.md index d7ccf59b..4a0afe5d 100644 --- a/app_docker/www/intro_da.md +++ b/app_docker/www/intro_da.md @@ -6,11 +6,13 @@ output: html_fragment Dette er ***FreesearchR***-værktøjet, et gratis værktøj til databehandling og -analyse. Har du brug for mere avancerede værktøjer, så kan du starte ***FreesearchR*** og senere selv hente *R* og *RStudio* eller lignende. +Vi arbejder hårdt på at introducere en komplet oversættelse til dansk. Hvis du har lyst til at bidrage, er du velkommen til at kontakte os på [info@freesearchr.org](mailto:info@freesearchr.org). + Herunder kan du helt kort se, hvad du kan bruge ***FreesearchR*** til: -1. **Import data** from a spreadsheet/file on your machine, directly from a [REDCap](https://projectredcap.org/ "Read more on the data capture tool REDCap") server, try it with sample data or access data directly [if run in R locally](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Read about running FreesearchR on your local machine") +1. **Importér data** fra regneark/fil på din enhed, direkte fra en [REDCap-server](https://projectredcap.org/ "Læs mere of REDCap-værktøjet"), afprøv med eksempel-data eller tilgå data direkte [hvis du afvikler i R lokalt](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Læs mere om at køre FreesearchR på din egen maskine") -2. **Prepare** data for analysis by filtering data, modifying variables or create new variables +2. **Forbered** data til analys ved at filtrere, ændre variabler eller opret helt nye variabler 3. **Evaluate data** using descriptive analyses methods and inspect cross-correlations as well as [missing observations](https://agdamsbo.github.io/FreesearchR/articles/missingness.html "Read more about missing data") diff --git a/app_docker/www/intro_sw.html b/app_docker/www/intro_sw.html index 39ee4dc9..40da6fd4 100644 --- a/app_docker/www/intro_sw.html +++ b/app_docker/www/intro_sw.html @@ -3,12 +3,14 @@

    Karibu

    -

    This is the FreesearchR data analysis tool, -a free tool for basic data evaluation and analysis. If you need more -advanced tools, start with FreesearchR and -then you’ll probably be better off using R or similar -directly.

    -

    With this tool you can:

    +

    Hii ni FreesearchR zana ya kuchanganua +data, zana isiyolipishwa ya kutathmini na kuchanganua data msingi. Iwapo +unahitaji zana za kina zaidi, anza na +FreesearchR na basi pengine utakuwa bora +kutumia R au sawa moja kwa moja.

    +

    Tunajitahidi kutambulisha tafsiri kamili kwa Kiswahili. Ikiwa +ungependa kuchangia, tafadhali wasiliana na info@freesearchr.org.

    +

    Na FreesearchR unaweza:

    1. Import data from a spreadsheet/file on your machine, directly from a REDCap server, try diff --git a/app_docker/www/intro_sw.md b/app_docker/www/intro_sw.md index 37c7f09a..06a8bea3 100644 --- a/app_docker/www/intro_sw.md +++ b/app_docker/www/intro_sw.md @@ -4,9 +4,11 @@ output: html_fragment # Karibu -This is the ***FreesearchR*** data analysis tool, a free tool for basic data evaluation and analysis. If you need more advanced tools, start with ***FreesearchR*** and then you'll probably be better off using *R* or similar directly. +Hii ni ***FreesearchR*** zana ya kuchanganua data, zana isiyolipishwa ya kutathmini na kuchanganua data msingi. Iwapo unahitaji zana za kina zaidi, anza na ***FreesearchR*** na basi pengine utakuwa bora kutumia *R* au sawa moja kwa moja. -With this tool you can: +Tunajitahidi kutambulisha tafsiri kamili kwa Kiswahili. Ikiwa ungependa kuchangia, tafadhali wasiliana na [info@freesearchr.org](mailto:info@freesearchr.org). + +Na ***FreesearchR*** unaweza: 1. **Import data** from a spreadsheet/file on your machine, directly from a [REDCap](https://projectredcap.org/ "Read more on the data capture tool REDCap") server, try it with sample data or access data directly [if run in R locally](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Read about running FreesearchR on your local machine") diff --git a/inst/apps/FreesearchR/app.R b/inst/apps/FreesearchR/app.R index 2de02a7a..64ae144d 100644 --- a/inst/apps/FreesearchR/app.R +++ b/inst/apps/FreesearchR/app.R @@ -1,7 +1,7 @@ ######## -#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpWiu9wh/file1e99785ae783.R +#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c957fe45e09.R ######## i18n_path <- system.file("translations", package = "FreesearchR") @@ -62,7 +62,7 @@ i18n$set_translation_language("en") #### Current file: /Users/au301842/FreesearchR/R//app_version.R ######## -app_version <- function()'25.10.1' +app_version <- function()'25.10.2' ######## @@ -4035,7 +4035,7 @@ data_types <- function() { #### Current file: /Users/au301842/FreesearchR/R//hosted_version.R ######## -hosted_version <- function()'v25.10.1-251002' +hosted_version <- function()'v25.10.2-251007' ######## @@ -4567,7 +4567,7 @@ import_file_ui <- function(id, shiny::tags$b(i18n$t("No file selected.")), # shiny::textOutput(ns("trans_format_text")), # This is the easiest solution, though not gramatically perfect - i18n$t("You can choose between these file types:"), paste(file_extensions,collapse=', '), + i18n$t("You can choose between these file types:"), paste(file_extensions, collapse = ", "), # sprintf("You can import %s files", paste(file_extensions, collapse = ", ")), dismissible = TRUE ) @@ -4600,7 +4600,8 @@ import_file_server <- function(id, show_data_in = c("popup", "modal"), trigger_return = c("button", "change"), return_class = c("data.frame", "data.table", "tbl_df", "raw"), - reset = reactive(NULL)) { + reset = reactive(NULL), + limit=100000) { read_fns <- list( ods = "import_ods", dta = "import_dta", @@ -4719,6 +4720,10 @@ import_file_server <- function(id, extra = if (isTRUE(input$preview_data)) i18n$t("First five rows are shown below:") ) ) + + ## As a protective measure, the dataset size is capped at cell limit + imported <- limit_data_size(imported,limit = limit) + temporary_rv$status <- "success" temporary_rv$data <- imported temporary_rv$name <- input$file$name @@ -4927,9 +4932,20 @@ import_dta <- function(file) { #' @export #' import_rds <- function(file) { - readr::read_rds( + out <- readr::read_rds( file = file ) + + if (is.data.frame(out)) { + out + } else if (is.vector(out) && !is.null(dim(out))) { + ## If the data is a simple vector (simple test), it is coerced to a data.frame + as.data.frame(out) + } else { + ## If not a data.frame and not a vector (probably a list of elements) + ## Flattened to ensure no nested lists + as.data.frame(purrr::list_flatten(out)[[1]]) + } } #' @title Create a select input control with icon(s) @@ -5035,6 +5051,42 @@ import_file_demo_app <- function() { } +#' Limit the allowed data set size by number of cells +#' +#' @description +#' This function may act to guard a hosted app against very large data sets in +#' addition to the file size limitations. +#' The function will limit the data set by dropping rows. +#' +#' +#' @param data data.frame +#' @param limit cell number limit. Default is NULL. +#' +#' @returns data.frame +#' @export +#' +#' @examples +#' prod(dim(mtcars)) +#' limit_data_size(mtcars) +#' limit_data_size(mtcars,100) +limit_data_size <- function(data, limit = NULL) { + ## Add security to only allow dataset of 100.000 cells + ## Ideally this should only go for the hosted version + + if (is.null(limit)){ + return(data) + } + + data_dim <- dim(data) + + if (prod(data_dim) > limit) { + head(data, floor(limit / data_dim[2])) + } else { + data + } +} + + ######## #### Current file: /Users/au301842/FreesearchR/R//launch_FreesearchR.R ######## @@ -5520,7 +5572,8 @@ vertical_stacked_bars <- function(data, t.size = 10, l.color = "black", l.size = .5, - draw.lines = TRUE) { + draw.lines = TRUE, + label.str="{n}\n{round(100 * p,0)}%") { if (is.null(group)) { df.table <- data[c(score, group, strata)] |> dplyr::mutate("All" = 1) |> @@ -5565,7 +5618,8 @@ vertical_stacked_bars <- function(data, y = p_prev + 0.49 * p, color = as.numeric(score) > contrast_cut, # label = paste0(sprintf("%2.0f", 100 * p),"%"), - label = sprintf("%2.0f", 100 * p) + # label = sprintf("%2.0f", 100 * p) + label = glue::glue(label.str) ) ) + ggplot2::labs(fill = score_label) + @@ -9019,7 +9073,7 @@ ui_elements <- function(selection) { "Yes" = "yes" ) ), - shiny::helpText("Option to perform statistical comparisons between strata in baseline table.") + shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")) ), shiny::br(), shiny::br(), @@ -9029,7 +9083,8 @@ ui_elements <- function(selection) { width = "100%", icon = shiny::icon("calculator"), disabled = TRUE - ) + ), + shiny::helpText(i18n$t("Press 'Evaluate' to create the comparison table.")) ) ) ), @@ -11361,7 +11416,7 @@ ui <- bslib::page_fixed( ## Code formatting dependencies prismDependencies, prismRDependency, - html_dependency_FreesearchR(), + # html_dependency_FreesearchR(), ## Version dependent header header_include(), ## This adds the actual favicon @@ -11427,9 +11482,9 @@ server <- function(input, output, session) { files.to.keep <- list.files("www/") ## This works in a minimal working example, but not here. Will investigate. -# shinyjs::runjs("var language = window.navigator.userLanguage || window.navigator.language; -# var shortLang = language.split('-')[0]; -# Shiny.onInputChange('browser_lang', shortLang);") + # shinyjs::runjs("var language = window.navigator.userLanguage || window.navigator.language; + # var shortLang = language.split('-')[0]; + # Shiny.onInputChange('browser_lang', shortLang);") load_data() @@ -11563,6 +11618,7 @@ server <- function(input, output, session) { output$intro_text <- renderUI(includeHTML(i18n$t("www/intro.html"))) }) + ## This is not working but kept to try to solve if deemed necessary shiny::observe( output$footer_text_div <- renderUI({ shiny::tags$footer( @@ -11629,7 +11685,9 @@ server <- function(input, output, session) { id = "file_import", show_data_in = "popup", trigger_return = "change", - return_class = "data.frame" + return_class = "data.frame", + ## Added data.frame size limit (number of cells), rows are dropped to fit + limit = 100000 ) shiny::observeEvent(data_file$data(), { @@ -11677,7 +11735,7 @@ server <- function(input, output, session) { modal_visual_summary( id = "initial_summary", footer = NULL, - size = "xl",title = i18n$t("Data classes and missing observations") + size = "xl", title = i18n$t("Data classes and missing observations") ) }, error = function(err) { @@ -12275,6 +12333,19 @@ server <- function(input, output, session) { data_description(rv$list$data, data_text = "The dataset without text variables") }) + ## Only allow evaluation if the dataset has fewer then 50 variables + ## + + # shiny::observeEvent( + # list( + # rv$list$data + # ), + # { + # shiny::req(rv$list$data) + # + # }) + + shiny::observeEvent( list( input$act_eval @@ -12289,9 +12360,25 @@ server <- function(input, output, session) { add.overall = TRUE ) - shiny::withProgress(message = "Creating the table. Hold on for a moment..", { - rv$list$table1 <- rlang::exec(create_baseline, !!!append_list(rv$list$data, parameters, "data")) - }) + + # Attempt to introduce error on analysing too large dataset + # tryCatch( + # { + # if (ncol(rv$list$data) > 10) { + # n_col <- ncol(rv$list$data) + # # stop(glue::glue(i18n$t("The data includes {n_col} variables. Please limit to 100."))) + # print("Please limit to 100.") + # } else { + shiny::withProgress(message = "Creating the table. Hold on for a moment..", { + rv$list$table1 <- rlang::exec(create_baseline, !!!append_list(rv$list$data, parameters, "data")) + }) + # } + # }, + # error = function(err) { + # showNotification(err, type = "err") + # } + # ) + rv$code$table1 <- glue::glue("FreesearchR::create_baseline(df,{list2str(parameters)})") } diff --git a/inst/apps/FreesearchR/www/intro_da.html b/inst/apps/FreesearchR/www/intro_da.html index 5df8d8b3..e372d960 100644 --- a/inst/apps/FreesearchR/www/intro_da.html +++ b/inst/apps/FreesearchR/www/intro_da.html @@ -8,15 +8,18 @@ værktøj til databehandling og -analyse. Har du brug for mere avancerede værktøjer, så kan du starte FreesearchR og senere selv hente R og RStudio eller lignende.

      +

      Vi arbejder hårdt på at introducere en komplet oversættelse til +dansk. Hvis du har lyst til at bidrage, er du velkommen til at kontakte +os på info@freesearchr.org.

      Herunder kan du helt kort se, hvad du kan bruge FreesearchR til:

        -
      1. Import data from a spreadsheet/file on your -machine, directly from a REDCap server, try -it with sample data or access data directly if run in R -locally

      2. -
      3. Prepare data for analysis by filtering data, -modifying variables or create new variables

      4. +
      5. Importér data fra regneark/fil på din enhed, +direkte fra en REDCap-server, afprøv med +eksempel-data eller tilgå data direkte hvis du +afvikler i R lokalt

      6. +
      7. Forbered data til analys ved at filtrere, ændre +variabler eller opret helt nye variabler

      8. Evaluate data using descriptive analyses methods and inspect cross-correlations as well as missing observations

      9. Visualise data by creating simple, clean plots for diff --git a/inst/apps/FreesearchR/www/intro_da.md b/inst/apps/FreesearchR/www/intro_da.md index d7ccf59b..4a0afe5d 100644 --- a/inst/apps/FreesearchR/www/intro_da.md +++ b/inst/apps/FreesearchR/www/intro_da.md @@ -6,11 +6,13 @@ output: html_fragment Dette er ***FreesearchR***-værktøjet, et gratis værktøj til databehandling og -analyse. Har du brug for mere avancerede værktøjer, så kan du starte ***FreesearchR*** og senere selv hente *R* og *RStudio* eller lignende. +Vi arbejder hårdt på at introducere en komplet oversættelse til dansk. Hvis du har lyst til at bidrage, er du velkommen til at kontakte os på [info@freesearchr.org](mailto:info@freesearchr.org). + Herunder kan du helt kort se, hvad du kan bruge ***FreesearchR*** til: -1. **Import data** from a spreadsheet/file on your machine, directly from a [REDCap](https://projectredcap.org/ "Read more on the data capture tool REDCap") server, try it with sample data or access data directly [if run in R locally](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Read about running FreesearchR on your local machine") +1. **Importér data** fra regneark/fil på din enhed, direkte fra en [REDCap-server](https://projectredcap.org/ "Læs mere of REDCap-værktøjet"), afprøv med eksempel-data eller tilgå data direkte [hvis du afvikler i R lokalt](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Læs mere om at køre FreesearchR på din egen maskine") -2. **Prepare** data for analysis by filtering data, modifying variables or create new variables +2. **Forbered** data til analys ved at filtrere, ændre variabler eller opret helt nye variabler 3. **Evaluate data** using descriptive analyses methods and inspect cross-correlations as well as [missing observations](https://agdamsbo.github.io/FreesearchR/articles/missingness.html "Read more about missing data") diff --git a/inst/apps/FreesearchR/www/intro_sw.html b/inst/apps/FreesearchR/www/intro_sw.html index 39ee4dc9..40da6fd4 100644 --- a/inst/apps/FreesearchR/www/intro_sw.html +++ b/inst/apps/FreesearchR/www/intro_sw.html @@ -3,12 +3,14 @@

        Karibu

        -

        This is the FreesearchR data analysis tool, -a free tool for basic data evaluation and analysis. If you need more -advanced tools, start with FreesearchR and -then you’ll probably be better off using R or similar -directly.

        -

        With this tool you can:

        +

        Hii ni FreesearchR zana ya kuchanganua +data, zana isiyolipishwa ya kutathmini na kuchanganua data msingi. Iwapo +unahitaji zana za kina zaidi, anza na +FreesearchR na basi pengine utakuwa bora +kutumia R au sawa moja kwa moja.

        +

        Tunajitahidi kutambulisha tafsiri kamili kwa Kiswahili. Ikiwa +ungependa kuchangia, tafadhali wasiliana na info@freesearchr.org.

        +

        Na FreesearchR unaweza:

        1. Import data from a spreadsheet/file on your machine, directly from a REDCap server, try diff --git a/inst/apps/FreesearchR/www/intro_sw.md b/inst/apps/FreesearchR/www/intro_sw.md index 37c7f09a..06a8bea3 100644 --- a/inst/apps/FreesearchR/www/intro_sw.md +++ b/inst/apps/FreesearchR/www/intro_sw.md @@ -4,9 +4,11 @@ output: html_fragment # Karibu -This is the ***FreesearchR*** data analysis tool, a free tool for basic data evaluation and analysis. If you need more advanced tools, start with ***FreesearchR*** and then you'll probably be better off using *R* or similar directly. +Hii ni ***FreesearchR*** zana ya kuchanganua data, zana isiyolipishwa ya kutathmini na kuchanganua data msingi. Iwapo unahitaji zana za kina zaidi, anza na ***FreesearchR*** na basi pengine utakuwa bora kutumia *R* au sawa moja kwa moja. -With this tool you can: +Tunajitahidi kutambulisha tafsiri kamili kwa Kiswahili. Ikiwa ungependa kuchangia, tafadhali wasiliana na [info@freesearchr.org](mailto:info@freesearchr.org). + +Na ***FreesearchR*** unaweza: 1. **Import data** from a spreadsheet/file on your machine, directly from a [REDCap](https://projectredcap.org/ "Read more on the data capture tool REDCap") server, try it with sample data or access data directly [if run in R locally](https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine "Read about running FreesearchR on your local machine") diff --git a/inst/translations/translation_da.csv b/inst/translations/translation_da.csv index 13ab3733..2d9b39b2 100644 --- a/inst/translations/translation_da.csv +++ b/inst/translations/translation_da.csv @@ -244,3 +244,6 @@ "Select checks to plot","Select checks to plot" "Multivariable regression model checks","Multivariable regression model checks" "Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}" +"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table." +"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table." +"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100." diff --git a/inst/translations/translation_sw.csv b/inst/translations/translation_sw.csv index 42613fca..aa1a4716 100644 --- a/inst/translations/translation_sw.csv +++ b/inst/translations/translation_sw.csv @@ -244,3 +244,6 @@ "Select checks to plot","Select checks to plot" "Multivariable regression model checks","Multivariable regression model checks" "Grouped by {get_label(data,ter)}","Grouped by {get_label(data,ter)}" +"Option to perform statistical comparisons between strata in baseline table.","Option to perform statistical comparisons between strata in baseline table." +"Press 'Evaluate' to create the comparison table.","Press 'Evaluate' to create the comparison table." +"The data includes {n_col} variables. Please limit to 100.","The data includes {n_col} variables. Please limit to 100." diff --git a/man/import-file.Rd b/man/import-file.Rd index 233800e2..0f092d52 100644 --- a/man/import-file.Rd +++ b/man/import-file.Rd @@ -21,7 +21,8 @@ import_file_server( show_data_in = c("popup", "modal"), trigger_return = c("button", "change"), return_class = c("data.frame", "data.table", "tbl_df", "raw"), - reset = reactive(NULL) + reset = reactive(NULL), + limit = 1e+05 ) } \arguments{ diff --git a/man/limit_data_size.Rd b/man/limit_data_size.Rd new file mode 100644 index 00000000..f6780e8c --- /dev/null +++ b/man/limit_data_size.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/import-file-ext.R +\name{limit_data_size} +\alias{limit_data_size} +\title{Limit the allowed data set size by number of cells} +\usage{ +limit_data_size(data, limit = NULL) +} +\arguments{ +\item{data}{data.frame} + +\item{limit}{cell number limit. Default is NULL.} +} +\value{ +data.frame +} +\description{ +This function may act to guard a hosted app against very large data sets in +addition to the file size limitations. +The function will limit the data set by dropping rows. +} +\examples{ +prod(dim(mtcars)) +limit_data_size(mtcars) +limit_data_size(mtcars,100) +} diff --git a/renv.lock b/renv.lock index 49bb63e6..548bff24 100644 --- a/renv.lock +++ b/renv.lock @@ -1201,7 +1201,8 @@ "License": "Unlimited", "NeedsCompilation": "no", "Author": "Angelo Canty [aut] (author of original code for S), Brian Ripley [aut, trl] (conversion to R, maintainer 1999--2022, author of parallel support), Alessandra R. Brazzale [ctb, cre] (minor bug fixes)", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "brio": { "Package": "brio", From 205b6740a8b01ab002fb2e5c4eb3f173a17bb3f3 Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Tue, 7 Oct 2025 14:04:52 +0200 Subject: [PATCH 4/4] correct version --- NEWS.md | 2 +- app_docker/app.R | 2 +- inst/apps/FreesearchR/app.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index 05e1263a..379064b0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# FreesearchR 25.10.2 - DEV +# FreesearchR 25.10.2 *NEW* Improvements to translations with more strings having been translated. diff --git a/app_docker/app.R b/app_docker/app.R index 966f4727..5c5ee209 100644 --- a/app_docker/app.R +++ b/app_docker/app.R @@ -1,7 +1,7 @@ ######## -#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c9538b32097.R +#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c9540d9ead9.R ######## i18n_path <- here::here("translations") diff --git a/inst/apps/FreesearchR/app.R b/inst/apps/FreesearchR/app.R index 64ae144d..a5b7d24e 100644 --- a/inst/apps/FreesearchR/app.R +++ b/inst/apps/FreesearchR/app.R @@ -1,7 +1,7 @@ ######## -#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c957fe45e09.R +#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c953618a132.R ######## i18n_path <- system.file("translations", package = "FreesearchR")