mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-15 00:52:09 +01:00
latest version render
This commit is contained in:
parent
346bc7edf7
commit
8db847b43d
28 changed files with 397 additions and 107 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
11
NEWS.md
11
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.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
app_version <- function()'25.10.1'
|
||||
app_version <- function()'25.10.2'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
hosted_version <- function()'v25.10.1-251002'
|
||||
hosted_version <- function()'v25.10.2-251007'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
|
|
@ -376,7 +376,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(),
|
||||
|
|
@ -386,7 +386,8 @@ ui_elements <- function(selection) {
|
|||
width = "100%",
|
||||
icon = shiny::icon("calculator"),
|
||||
disabled = TRUE
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Press 'Evaluate' to create the comparison table."))
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
|||
53
SESSION.md
53
SESSION.md
|
|
@ -11,11 +11,11 @@
|
|||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|date |2025-10-02 |
|
||||
|date |2025-10-07 |
|
||||
|rstudio |2025.05.0+496 Mariposa Orchid (desktop) |
|
||||
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|
||||
|quarto |1.7.30 @ /usr/local/bin/quarto |
|
||||
|FreesearchR |25.10.1.251002 |
|
||||
|FreesearchR |25.10.2.251007 |
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -26,13 +26,15 @@
|
|||
|apexcharter |0.4.4 |2024-09-06 |CRAN (R 4.4.1) |
|
||||
|askpass |1.2.1 |2024-10-04 |CRAN (R 4.4.1) |
|
||||
|assertthat |0.2.1 |2019-03-21 |CRAN (R 4.4.1) |
|
||||
|attachment |0.4.5 |2025-03-14 |CRAN (R 4.4.1) |
|
||||
|attempt |0.3.1 |2020-05-03 |CRAN (R 4.4.1) |
|
||||
|backports |1.5.0 |2024-05-23 |CRAN (R 4.4.1) |
|
||||
|base64enc |0.1-3 |2015-07-28 |CRAN (R 4.4.1) |
|
||||
|bayestestR |0.16.1 |2025-07-01 |CRAN (R 4.4.1) |
|
||||
|bit |4.6.0 |2025-03-06 |CRAN (R 4.4.1) |
|
||||
|bit64 |4.6.0-1 |2025-01-16 |CRAN (R 4.4.1) |
|
||||
|bitops |1.0-9 |2024-10-03 |CRAN (R 4.4.1) |
|
||||
|boot |1.3-31 |2024-08-28 |CRAN (R 4.4.1) |
|
||||
|boot |1.3-31 |2024-08-28 |RSPM (R 4.4.0) |
|
||||
|brio |1.1.5 |2024-04-24 |CRAN (R 4.4.1) |
|
||||
|broom |1.0.9 |2025-07-28 |CRAN (R 4.4.1) |
|
||||
|broom.helpers |1.21.0 |2025-04-24 |CRAN (R 4.4.1) |
|
||||
|
|
@ -45,7 +47,7 @@
|
|||
|caTools |1.18.3 |2024-09-04 |CRAN (R 4.4.1) |
|
||||
|cellranger |1.1.0 |2016-07-27 |CRAN (R 4.4.0) |
|
||||
|cffr |1.2.0 |2025-01-25 |CRAN (R 4.4.1) |
|
||||
|checkmate |2.3.2 |2024-07-29 |CRAN (R 4.4.0) |
|
||||
|checkmate |2.3.2 |2024-07-29 |RSPM (R 4.4.0) |
|
||||
|class |7.3-23 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|classInt |0.4-11 |2025-01-08 |CRAN (R 4.4.1) |
|
||||
|cli |3.6.5 |2025-04-23 |CRAN (R 4.4.1) |
|
||||
|
|
@ -54,7 +56,7 @@
|
|||
|colorspace |2.1-1 |2024-07-26 |CRAN (R 4.4.1) |
|
||||
|commonmark |2.0.0 |2025-07-07 |CRAN (R 4.4.1) |
|
||||
|crayon |1.5.3 |2024-06-20 |CRAN (R 4.4.1) |
|
||||
|curl |6.4.0 |2025-06-22 |CRAN (R 4.4.1) |
|
||||
|curl |6.4.0 |2025-06-22 |RSPM (R 4.4.0) |
|
||||
|data.table |1.17.8 |2025-07-10 |CRAN (R 4.4.1) |
|
||||
|datamods |1.5.3 |2024-10-02 |CRAN (R 4.4.1) |
|
||||
|datawizard |1.2.0 |2025-07-17 |CRAN (R 4.4.1) |
|
||||
|
|
@ -63,6 +65,7 @@
|
|||
|devtools |2.4.5 |2022-10-11 |CRAN (R 4.4.0) |
|
||||
|DHARMa |0.4.7 |2024-10-18 |CRAN (R 4.4.1) |
|
||||
|digest |0.6.37 |2024-08-19 |CRAN (R 4.4.1) |
|
||||
|dockerfiler |0.2.5 |2025-05-07 |CRAN (R 4.4.1) |
|
||||
|doParallel |1.0.17 |2022-02-07 |CRAN (R 4.4.0) |
|
||||
|dplyr |1.1.4 |2023-11-17 |CRAN (R 4.4.0) |
|
||||
|DT |0.33 |2024-04-04 |CRAN (R 4.4.0) |
|
||||
|
|
@ -73,7 +76,7 @@
|
|||
|esquisse |2.1.0 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|estimability |1.5.1 |2024-05-12 |CRAN (R 4.4.1) |
|
||||
|eulerr |7.0.2 |2024-03-28 |CRAN (R 4.4.0) |
|
||||
|evaluate |1.0.4 |2025-06-18 |CRAN (R 4.4.1) |
|
||||
|evaluate |1.0.4 |2025-06-18 |RSPM (R 4.4.0) |
|
||||
|farver |2.1.2 |2024-05-13 |CRAN (R 4.4.1) |
|
||||
|fastmap |1.2.0 |2024-05-15 |CRAN (R 4.4.1) |
|
||||
|flextable |0.9.9 |2025-05-31 |CRAN (R 4.4.1) |
|
||||
|
|
@ -81,11 +84,11 @@
|
|||
|fontBitstreamVera |0.1.1 |2017-02-01 |CRAN (R 4.4.1) |
|
||||
|fontLiberation |0.1.0 |2016-10-15 |CRAN (R 4.4.1) |
|
||||
|fontquiver |0.2.1 |2017-02-01 |CRAN (R 4.4.0) |
|
||||
|forcats |1.0.0 |2023-01-29 |CRAN (R 4.4.0) |
|
||||
|forcats |1.0.0 |2023-01-29 |RSPM (R 4.4.0) |
|
||||
|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.10.1 |NA |NA |
|
||||
|FreesearchR |25.10.2 |NA |NA |
|
||||
|fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|gdtools |0.4.2 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|generics |0.1.4 |2025-05-09 |CRAN (R 4.4.1) |
|
||||
|
|
@ -118,16 +121,16 @@
|
|||
|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.2 |2025-04-08 |CRAN (R 4.4.1) |
|
||||
|later |1.4.2 |2025-04-08 |RSPM (R 4.4.0) |
|
||||
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.4.1) |
|
||||
|lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) |
|
||||
|litedown |0.7 |2025-04-08 |CRAN (R 4.4.1) |
|
||||
|lme4 |1.1-37 |2025-03-26 |CRAN (R 4.4.1) |
|
||||
|lubridate |1.9.4 |2024-12-08 |CRAN (R 4.4.1) |
|
||||
|magrittr |2.0.3 |2022-03-30 |CRAN (R 4.4.1) |
|
||||
|magrittr |2.0.3 |2022-03-30 |RSPM (R 4.4.0) |
|
||||
|markdown |2.0 |2025-03-23 |CRAN (R 4.4.1) |
|
||||
|MASS |7.3-65 |2025-02-28 |CRAN (R 4.4.1) |
|
||||
|Matrix |1.7-3 |2025-03-11 |CRAN (R 4.4.1) |
|
||||
|Matrix |1.7-3 |2025-03-11 |RSPM (R 4.4.0) |
|
||||
|memoise |2.0.1 |2021-11-26 |CRAN (R 4.4.0) |
|
||||
|mime |0.13 |2025-03-17 |CRAN (R 4.4.1) |
|
||||
|miniUI |0.1.2 |2025-04-17 |CRAN (R 4.4.1) |
|
||||
|
|
@ -141,18 +144,18 @@
|
|||
|opdisDownsampling |1.0.1 |2024-04-15 |CRAN (R 4.4.0) |
|
||||
|openssl |2.3.3 |2025-05-26 |CRAN (R 4.4.1) |
|
||||
|openxlsx2 |1.18 |2025-07-29 |CRAN (R 4.4.1) |
|
||||
|pak |0.9.0 |2025-05-27 |CRAN (R 4.4.1) |
|
||||
|parameters |0.27.0 |2025-07-09 |CRAN (R 4.4.1) |
|
||||
|patchwork |1.3.1 |2025-06-21 |CRAN (R 4.4.1) |
|
||||
|patchwork |1.3.1 |2025-06-21 |RSPM (R 4.4.0) |
|
||||
|pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.4.1) |
|
||||
|performance |0.15.0 |2025-07-10 |CRAN (R 4.4.1) |
|
||||
|phosphoricons |0.2.1 |2024-04-08 |CRAN (R 4.4.0) |
|
||||
|pillar |1.11.0 |2025-07-04 |CRAN (R 4.4.1) |
|
||||
|pillar |1.11.0 |2025-07-04 |RSPM (R 4.4.0) |
|
||||
|pkgbuild |1.4.8 |2025-05-26 |CRAN (R 4.4.1) |
|
||||
|pkgconfig |2.0.3 |2019-09-22 |CRAN (R 4.4.1) |
|
||||
|pkgload |1.4.0 |2024-06-28 |CRAN (R 4.4.0) |
|
||||
|pkgload |1.4.0 |2024-06-28 |RSPM (R 4.4.0) |
|
||||
|plyr |1.8.9 |2023-10-02 |CRAN (R 4.4.1) |
|
||||
|polyclip |1.10-7 |2024-07-23 |CRAN (R 4.4.1) |
|
||||
|polylabelr |0.3.0 |2024-11-19 |CRAN (R 4.4.1) |
|
||||
|pracma |2.4.4 |2023-11-10 |CRAN (R 4.4.1) |
|
||||
|processx |3.8.6 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|profvis |0.4.0 |2024-09-20 |CRAN (R 4.4.1) |
|
||||
|
|
@ -163,12 +166,11 @@
|
|||
|qqconf |1.3.2 |2023-04-14 |CRAN (R 4.4.0) |
|
||||
|qqplotr |0.0.6 |2023-01-25 |CRAN (R 4.4.0) |
|
||||
|quarto |1.5.0 |2025-07-28 |RSPM (R 4.4.0) |
|
||||
|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.4.0 |2025-04-10 |CRAN (R 4.4.1) |
|
||||
|ragg |1.4.0 |2025-04-10 |RSPM (R 4.4.0) |
|
||||
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.4.0) |
|
||||
|rappdirs |0.3.3 |2021-01-31 |CRAN (R 4.4.1) |
|
||||
|rbibutils |2.3 |2024-10-04 |CRAN (R 4.4.1) |
|
||||
|
|
@ -191,9 +193,9 @@
|
|||
|rlang |1.1.6 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|rmarkdown |2.29 |2024-11-04 |CRAN (R 4.4.1) |
|
||||
|robustbase |0.99-4-1 |2024-09-27 |CRAN (R 4.4.1) |
|
||||
|roxygen2 |7.3.2 |2024-06-28 |CRAN (R 4.4.0) |
|
||||
|roxygen2 |7.3.2 |2024-06-28 |RSPM (R 4.4.0) |
|
||||
|rpart |4.1.24 |2025-01-07 |CRAN (R 4.4.1) |
|
||||
|rprojroot |2.1.0 |2025-07-12 |CRAN (R 4.4.1) |
|
||||
|rprojroot |2.1.0 |2025-07-12 |RSPM (R 4.4.0) |
|
||||
|rsconnect |1.5.0 |2025-06-26 |CRAN (R 4.4.1) |
|
||||
|rstudioapi |0.17.1 |2024-10-22 |CRAN (R 4.4.1) |
|
||||
|sass |0.4.10 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|
|
@ -202,17 +204,17 @@
|
|||
|sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.4.1) |
|
||||
|shiny |1.11.1 |2025-07-03 |CRAN (R 4.4.1) |
|
||||
|shiny.i18n |0.3.0 |2023-01-16 |CRAN (R 4.4.0) |
|
||||
|shiny2docker |0.0.3 |2025-06-28 |CRAN (R 4.4.1) |
|
||||
|shinybusy |0.3.3 |2024-03-09 |CRAN (R 4.4.0) |
|
||||
|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) |
|
||||
|stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|stringr |1.5.1 |2023-11-14 |CRAN (R 4.4.0) |
|
||||
|stringr |1.5.1 |2023-11-14 |RSPM (R 4.4.0) |
|
||||
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|styler |1.10.3 |2024-04-07 |CRAN (R 4.4.0) |
|
||||
|systemfonts |1.2.3 |2025-04-30 |CRAN (R 4.4.1) |
|
||||
|testthat |3.2.3 |2025-01-13 |CRAN (R 4.4.1) |
|
||||
|textshaping |1.0.1 |2025-05-01 |CRAN (R 4.4.1) |
|
||||
|textshaping |1.0.1 |2025-05-01 |RSPM (R 4.4.0) |
|
||||
|thematic |0.1.7 |2025-06-19 |CRAN (R 4.4.1) |
|
||||
|tibble |3.3.0 |2025-06-08 |CRAN (R 4.4.1) |
|
||||
|tidyr |1.3.1 |2024-01-24 |CRAN (R 4.4.1) |
|
||||
|
|
@ -223,7 +225,7 @@
|
|||
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.4.1) |
|
||||
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) |
|
||||
|urlchecker |1.0.1 |2021-11-30 |CRAN (R 4.4.1) |
|
||||
|usethis |3.1.0 |2024-11-26 |CRAN (R 4.4.1) |
|
||||
|usethis |3.1.0 |2024-11-26 |RSPM (R 4.4.0) |
|
||||
|utf8 |1.2.6 |2025-06-08 |CRAN (R 4.4.1) |
|
||||
|uuid |1.2-1 |2024-07-29 |CRAN (R 4.4.1) |
|
||||
|V8 |6.0.6 |2025-08-18 |CRAN (R 4.4.1) |
|
||||
|
|
@ -231,8 +233,9 @@
|
|||
|vroom |1.6.5 |2023-12-05 |CRAN (R 4.4.0) |
|
||||
|withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) |
|
||||
|writexl |1.5.4 |2025-04-15 |CRAN (R 4.4.1) |
|
||||
|xfun |0.52 |2025-04-02 |CRAN (R 4.4.1) |
|
||||
|xml2 |1.3.8 |2025-03-14 |CRAN (R 4.4.1) |
|
||||
|xfun |0.52 |2025-04-02 |RSPM (R 4.4.0) |
|
||||
|xml2 |1.3.8 |2025-03-14 |RSPM (R 4.4.0) |
|
||||
|xtable |1.8-4 |2019-04-21 |CRAN (R 4.4.1) |
|
||||
|yaml |2.3.10 |2024-07-26 |CRAN (R 4.4.1) |
|
||||
|yesno |0.1.3 |2024-07-26 |CRAN (R 4.4.1) |
|
||||
|zip |2.3.3 |2025-05-13 |CRAN (R 4.4.1) |
|
||||
|
|
|
|||
123
app_docker/app.R
123
app_docker/app.R
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
|
||||
########
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpWiu9wh/file1e9944acd364.R
|
||||
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmprKaNhO/file2c9538b32097.R
|
||||
########
|
||||
|
||||
i18n_path <- here::here("translations")
|
||||
|
|
@ -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."))
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -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)})")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
|
|
|
|||
|
|
|
@ -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."
|
||||
|
|
|
|||
|
|
|
@ -8,15 +8,18 @@
|
|||
værktøj til databehandling og -analyse. Har du brug for mere avancerede
|
||||
værktøjer, så kan du starte <strong><em>FreesearchR</em></strong> og
|
||||
senere selv hente <em>R</em> og <em>RStudio</em> eller lignende.</p>
|
||||
<p>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å <a href="mailto:info@freesearchr.org">info@freesearchr.org</a>.</p>
|
||||
<p>Herunder kan du helt kort se, hvad du kan bruge
|
||||
<strong><em>FreesearchR</em></strong> til:</p>
|
||||
<ol style="list-style-type: decimal">
|
||||
<li><p><strong>Import data</strong> from a spreadsheet/file on your
|
||||
machine, directly from a <a href="https://projectredcap.org/" title="Read more on the data capture tool REDCap">REDCap</a> server, try
|
||||
it with sample data or access data directly <a href="https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine" title="Read about running FreesearchR on your local machine">if run in R
|
||||
locally</a></p></li>
|
||||
<li><p><strong>Prepare</strong> data for analysis by filtering data,
|
||||
modifying variables or create new variables</p></li>
|
||||
<li><p><strong>Importér data</strong> fra regneark/fil på din enhed,
|
||||
direkte fra en <a href="https://projectredcap.org/" title="Læs mere of REDCap-værktøjet">REDCap-server</a>, afprøv med
|
||||
eksempel-data eller tilgå data direkte <a href="https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine" title="Læs mere om at køre FreesearchR på din egen maskine">hvis du
|
||||
afvikler i R lokalt</a></p></li>
|
||||
<li><p><strong>Forbered</strong> data til analys ved at filtrere, ændre
|
||||
variabler eller opret helt nye variabler</p></li>
|
||||
<li><p><strong>Evaluate data</strong> using descriptive analyses methods
|
||||
and inspect cross-correlations as well as <a href="https://agdamsbo.github.io/FreesearchR/articles/missingness.html" title="Read more about missing data">missing observations</a></p></li>
|
||||
<li><p><strong>Visualise data</strong> by <a href="https://agdamsbo.github.io/FreesearchR/articles/visuals.html" title="See available plot types">creating simple, clean plots</a> for
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,9 +4,11 @@ output: html_fragment
|
|||
|
||||
# Karibu <img src="FreesearchR-logo.png" style="float: right;"/>
|
||||
|
||||
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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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)})")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,15 +8,18 @@
|
|||
værktøj til databehandling og -analyse. Har du brug for mere avancerede
|
||||
værktøjer, så kan du starte <strong><em>FreesearchR</em></strong> og
|
||||
senere selv hente <em>R</em> og <em>RStudio</em> eller lignende.</p>
|
||||
<p>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å <a href="mailto:info@freesearchr.org">info@freesearchr.org</a>.</p>
|
||||
<p>Herunder kan du helt kort se, hvad du kan bruge
|
||||
<strong><em>FreesearchR</em></strong> til:</p>
|
||||
<ol style="list-style-type: decimal">
|
||||
<li><p><strong>Import data</strong> from a spreadsheet/file on your
|
||||
machine, directly from a <a href="https://projectredcap.org/" title="Read more on the data capture tool REDCap">REDCap</a> server, try
|
||||
it with sample data or access data directly <a href="https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine" title="Read about running FreesearchR on your local machine">if run in R
|
||||
locally</a></p></li>
|
||||
<li><p><strong>Prepare</strong> data for analysis by filtering data,
|
||||
modifying variables or create new variables</p></li>
|
||||
<li><p><strong>Importér data</strong> fra regneark/fil på din enhed,
|
||||
direkte fra en <a href="https://projectredcap.org/" title="Læs mere of REDCap-værktøjet">REDCap-server</a>, afprøv med
|
||||
eksempel-data eller tilgå data direkte <a href="https://agdamsbo.github.io/FreesearchR//#run-locally-on-your-own-machine" title="Læs mere om at køre FreesearchR på din egen maskine">hvis du
|
||||
afvikler i R lokalt</a></p></li>
|
||||
<li><p><strong>Forbered</strong> data til analys ved at filtrere, ændre
|
||||
variabler eller opret helt nye variabler</p></li>
|
||||
<li><p><strong>Evaluate data</strong> using descriptive analyses methods
|
||||
and inspect cross-correlations as well as <a href="https://agdamsbo.github.io/FreesearchR/articles/missingness.html" title="Read more about missing data">missing observations</a></p></li>
|
||||
<li><p><strong>Visualise data</strong> by <a href="https://agdamsbo.github.io/FreesearchR/articles/visuals.html" title="See available plot types">creating simple, clean plots</a> for
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,9 +4,11 @@ output: html_fragment
|
|||
|
||||
# Karibu <img src="FreesearchR-logo.png" style="float: right;"/>
|
||||
|
||||
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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
|
|
|
|||
|
|
|
@ -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."
|
||||
|
|
|
|||
|
|
|
@ -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{
|
||||
|
|
|
|||
26
man/limit_data_size.Rd
Normal file
26
man/limit_data_size.Rd
Normal file
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue