mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
Compare commits
No commits in common. "16e3e5eb28402decdb64e3b9c526583678be2da7" and "42f91e903bc802b6d90c447025780ccde6b5bac8" have entirely different histories.
16e3e5eb28
...
42f91e903b
33 changed files with 3555 additions and 4275 deletions
15
CITATION.cff
15
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: 26.2.2
|
||||
version: 26.1.1
|
||||
doi: 10.5281/zenodo.14527429
|
||||
identifiers:
|
||||
- type: url
|
||||
|
|
@ -474,7 +474,7 @@ references:
|
|||
authors:
|
||||
- family-names: Lüdecke
|
||||
given-names: Daniel
|
||||
email: officialeasystats@gmail.com
|
||||
email: d.luedecke@uke.de
|
||||
orcid: https://orcid.org/0000-0002-8895-3206
|
||||
- family-names: Makowski
|
||||
given-names: Dominique
|
||||
|
|
@ -813,9 +813,6 @@ references:
|
|||
given-names: Barret
|
||||
email: barret@posit.co
|
||||
orcid: https://orcid.org/0000-0001-9986-114X
|
||||
- family-names: Haughton
|
||||
given-names: Shannon
|
||||
email: shannon.l.haughton@gsk.com
|
||||
- family-names: Hughes
|
||||
given-names: Ellis
|
||||
email: ellis.h.hughes@gsk.com
|
||||
|
|
@ -824,9 +821,6 @@ references:
|
|||
given-names: Alexandra
|
||||
email: alexandralauer1@gmail.com
|
||||
orcid: https://orcid.org/0000-0002-4191-6301
|
||||
- family-names: François
|
||||
given-names: Romain
|
||||
email: romain@tada.science
|
||||
- family-names: Seo
|
||||
given-names: JooYoung
|
||||
email: jseo1005@illinois.edu
|
||||
|
|
@ -927,7 +921,7 @@ references:
|
|||
authors:
|
||||
- family-names: Damsbo
|
||||
given-names: Andreas Gammelgaard
|
||||
email: andreas@gdamsbo.dk
|
||||
email: agdamsbo@clin.au.dk
|
||||
orcid: https://orcid.org/0000-0002-7559-1154
|
||||
- family-names: Egeler
|
||||
given-names: Paul
|
||||
|
|
@ -1107,14 +1101,11 @@ references:
|
|||
email: asrini@pm.me
|
||||
- family-names: Gorecki
|
||||
given-names: Jan
|
||||
email: j.gorecki@wit.edu.pl
|
||||
- family-names: Chirico
|
||||
given-names: Michael
|
||||
email: michaelchirico4@gmail.com
|
||||
orcid: https://orcid.org/0000-0003-0787-087X
|
||||
- family-names: Hocking
|
||||
given-names: Toby
|
||||
email: toby.hocking@r-project.org
|
||||
orcid: https://orcid.org/0000-0002-3146-0865
|
||||
- family-names: Schwendinger
|
||||
given-names: Benjamin
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Package: FreesearchR
|
||||
Title: Easy data analysis for clinicians
|
||||
Version: 26.2.2
|
||||
Version: 26.1.2
|
||||
Authors@R: c(
|
||||
person("Andreas Gammelgaard", "Damsbo",email="agdamsbo@clin.au.dk", role = c("aut", "cre"),
|
||||
comment = c(ORCID = "0000-0002-7559-1154")),
|
||||
|
|
|
|||
19
NEWS.md
19
NEWS.md
|
|
@ -1,22 +1,3 @@
|
|||
# FreesearchR 26.2.2
|
||||
|
||||
*FIX* Minor addition to the previous update with correct activation of the missingness evaluation button.
|
||||
|
||||
*FIX* Correct table headers for evaluating missings across groups.
|
||||
|
||||
# FreesearchR 26.2.1
|
||||
|
||||
This update is mainly focused on polishing, fixes and small additions to make the app more intuitive.
|
||||
|
||||
*NEW* Link on landing page to quickly go to data loading.
|
||||
|
||||
*NEW* Allow custom data set limit loading large data files, while tightening default limits. This secures the server, but also allows for unlimited use when run locally or from a custom server in a future implementation. The groundwork is place now.
|
||||
|
||||
*NEW* Hidden options and info alert when trying to analyse missing in complete dataset. The sub panel may be hidden in future iterations for this case.
|
||||
|
||||
Updated dependencies. Updated to latest R for building and testing. Using the new Air package for code formatting.
|
||||
|
||||
|
||||
# FreesearchR 26.1.2
|
||||
|
||||
Rebuild 26.1.1
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
app_version <- function()'26.2.2'
|
||||
app_version <- function()'26.1.2'
|
||||
|
|
|
|||
132
R/helpers.R
132
R/helpers.R
|
|
@ -50,7 +50,7 @@ write_quarto <- function(data, ...) {
|
|||
)
|
||||
}
|
||||
|
||||
write_rmd <- function(data, ..., params.args = NULL) {
|
||||
write_rmd <- function(data, ..., params.args=NULL) {
|
||||
# Exports data to temporary location
|
||||
#
|
||||
# I assume this is more secure than putting it in the www folder and deleting
|
||||
|
|
@ -65,10 +65,7 @@ write_rmd <- function(data, ..., params.args = NULL) {
|
|||
## Ref: https://github.com/quarto-dev/quarto-cli/discussions/4041
|
||||
## Outputs to the same as the .qmd file
|
||||
rmarkdown::render(
|
||||
params = modifyList(
|
||||
list(data.file = "web_data.rds", version = app_version()),
|
||||
params.args
|
||||
),
|
||||
params = modifyList(list(data.file = "web_data.rds",version=app_version()),params.args),
|
||||
# execute_params = list(data.file = temp),
|
||||
...
|
||||
)
|
||||
|
|
@ -136,7 +133,12 @@ argsstring2list <- function(string) {
|
|||
factorize <- function(data, vars) {
|
||||
if (!is.null(vars)) {
|
||||
data |>
|
||||
dplyr::mutate(dplyr::across(dplyr::all_of(vars), REDCapCAST::as_factor))
|
||||
dplyr::mutate(
|
||||
dplyr::across(
|
||||
dplyr::all_of(vars),
|
||||
REDCapCAST::as_factor
|
||||
)
|
||||
)
|
||||
} else {
|
||||
data
|
||||
}
|
||||
|
|
@ -169,30 +171,32 @@ dummy_Imports <- function() {
|
|||
#' @returns data
|
||||
#' @export
|
||||
#'
|
||||
file_export <- function(data,
|
||||
output.format = c("df", "teal", "list"),
|
||||
filename,
|
||||
...) {
|
||||
file_export <- function(data, output.format = c("df", "teal", "list"), filename, ...) {
|
||||
output.format <- match.arg(output.format)
|
||||
|
||||
filename <- gsub("-", "_", filename)
|
||||
|
||||
if (output.format == "teal") {
|
||||
out <- within(teal_data(), {
|
||||
assign(
|
||||
name,
|
||||
value |>
|
||||
out <- within(
|
||||
teal_data(),
|
||||
{
|
||||
assign(name, value |>
|
||||
dplyr::bind_cols(.name_repair = "unique_quiet") |>
|
||||
default_parsing()
|
||||
)
|
||||
}, value = data, name = filename)
|
||||
default_parsing())
|
||||
},
|
||||
value = data,
|
||||
name = filename
|
||||
)
|
||||
|
||||
datanames(out) <- filename
|
||||
} else if (output.format == "df") {
|
||||
out <- data |>
|
||||
default_parsing()
|
||||
} else if (output.format == "list") {
|
||||
out <- list(data = data, name = filename)
|
||||
out <- list(
|
||||
data = data,
|
||||
name = filename
|
||||
)
|
||||
|
||||
out <- c(out, ...)
|
||||
}
|
||||
|
|
@ -227,8 +231,7 @@ default_parsing <- function(data) {
|
|||
remove_nested_list() |>
|
||||
REDCapCAST::parse_data() |>
|
||||
REDCapCAST::as_factor() |>
|
||||
REDCapCAST::numchar2fct(numeric.threshold = 8,
|
||||
character.throshold = 10) |>
|
||||
REDCapCAST::numchar2fct(numeric.threshold = 8, character.throshold = 10) |>
|
||||
REDCapCAST::as_logical() |>
|
||||
REDCapCAST::fct_drop()
|
||||
|
||||
|
|
@ -292,11 +295,9 @@ remove_empty_attr <- function(data) {
|
|||
#' @examples
|
||||
#' data.frame(a = 1:10, b = NA, c = c(2, NA)) |> remove_empty_cols(cutoff = .5)
|
||||
remove_empty_cols <- function(data, cutoff = .7) {
|
||||
filter <- apply(X = data,
|
||||
MARGIN = 2,
|
||||
FUN = \(.x) {
|
||||
sum(as.numeric(!is.na(.x))) / length(.x)
|
||||
}) >= cutoff
|
||||
filter <- apply(X = data, MARGIN = 2, FUN = \(.x){
|
||||
sum(as.numeric(!is.na(.x))) / length(.x)
|
||||
}) >= cutoff
|
||||
data[filter]
|
||||
}
|
||||
|
||||
|
|
@ -356,25 +357,14 @@ missing_fraction <- function(data) {
|
|||
#' sample(c(1:8, NA), 20, TRUE)
|
||||
#' ) |> data_description()
|
||||
data_description <- function(data, data_text = "Data") {
|
||||
data <- if (shiny::is.reactive(data))
|
||||
data()
|
||||
else
|
||||
data
|
||||
data <- if (shiny::is.reactive(data)) data() else data
|
||||
|
||||
n <- nrow(data)
|
||||
n_var <- ncol(data)
|
||||
n_complete <- sum(complete.cases(data))
|
||||
p_complete <- signif(100 * n_complete / n, 3)
|
||||
|
||||
if (is.null(data)) {
|
||||
i18n$t("No data present.")
|
||||
} else {
|
||||
glue::glue(
|
||||
i18n$t(
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
)
|
||||
)
|
||||
}
|
||||
glue::glue(i18n$t("{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."))
|
||||
# sprintf(
|
||||
# "%s has %s observations and %s variables, with %s (%s%%) complete cases.",
|
||||
# data_text,
|
||||
|
|
@ -483,8 +473,7 @@ if_not_missing <- function(data, default = NULL) {
|
|||
#' ) |> merge_expression()
|
||||
merge_expression <- function(data) {
|
||||
Reduce(
|
||||
f = function(x, y)
|
||||
rlang::expr(!!x %>% !!y),
|
||||
f = function(x, y) rlang::expr(!!x %>% !!y),
|
||||
x = data
|
||||
)
|
||||
}
|
||||
|
|
@ -508,8 +497,7 @@ merge_expression <- function(data) {
|
|||
pipe_string <- function(data, collapse = "|>\n") {
|
||||
if (is.list(data)) {
|
||||
Reduce(
|
||||
f = function(x, y)
|
||||
glue::glue("{x}{collapse}{y}"),
|
||||
f = function(x, y) glue::glue("{x}{collapse}{y}"),
|
||||
x = data
|
||||
)
|
||||
} else {
|
||||
|
|
@ -533,15 +521,10 @@ pipe_string <- function(data, collapse = "|>\n") {
|
|||
#' merge_expression() |>
|
||||
#' expression_string()
|
||||
expression_string <- function(data, assign.str = "") {
|
||||
exp.str <- if (is.call(data))
|
||||
deparse(data)
|
||||
else
|
||||
data
|
||||
exp.str <- if (is.call(data)) deparse(data) else data
|
||||
|
||||
out <- paste0(assign.str, gsub("%>%", "|>\n", paste(gsub(
|
||||
'"', "'", paste(exp.str, collapse = "")
|
||||
), collapse = "")))
|
||||
out <- collapse_spaces(out, preserve_newlines = FALSE)
|
||||
out <- paste0(assign.str, gsub("%>%", "|>\n", paste(gsub('"', "'", paste(exp.str, collapse = "")), collapse = "")))
|
||||
out <- collapse_spaces(out,preserve_newlines = FALSE)
|
||||
gsub("`", "", out)
|
||||
}
|
||||
|
||||
|
|
@ -645,16 +628,10 @@ remove_nested_list <- function(data) {
|
|||
#' rlang::expr(FreesearchR::set_column_label(label = !!ls3)) |> expression_string()
|
||||
set_column_label <- function(data, label, overwrite = TRUE) {
|
||||
purrr::imap(data, function(.data, .name) {
|
||||
ls <- if (is.list(label))
|
||||
unlist(label)
|
||||
else
|
||||
label
|
||||
ls <- if (is.list(label)) unlist(label) else label
|
||||
ls[ls == ""] <- NA
|
||||
if (.name %in% names(ls)) {
|
||||
out <- REDCapCAST::set_attr(.data,
|
||||
unname(ls[.name]),
|
||||
attr = "label",
|
||||
overwrite = overwrite)
|
||||
out <- REDCapCAST::set_attr(.data, unname(ls[.name]), attr = "label", overwrite = overwrite)
|
||||
remove_empty_attr(out)
|
||||
} else {
|
||||
.data
|
||||
|
|
@ -705,8 +682,11 @@ append_column <- function(data, column, name, index = "right") {
|
|||
}
|
||||
new_df <- setNames(data.frame(column), name)
|
||||
|
||||
list(data[seq_len(index - 1)], new_df, if (!index > ncol(data))
|
||||
data[index:ncol(data)]) |>
|
||||
list(
|
||||
data[seq_len(index - 1)],
|
||||
new_df,
|
||||
if (!index > ncol(data)) data[index:ncol(data)]
|
||||
) |>
|
||||
dplyr::bind_cols()
|
||||
}
|
||||
|
||||
|
|
@ -731,7 +711,7 @@ is_identical_to_previous <- function(data, no.name = TRUE) {
|
|||
lagged <- c(FALSE, data[seq_len(length(data) - 1)])
|
||||
}
|
||||
|
||||
vapply(seq_len(length(data)), \(.x) {
|
||||
vapply(seq_len(length(data)), \(.x){
|
||||
if (isTRUE(no.name)) {
|
||||
identical(unname(lagged[.x]), unname(data[.x]))
|
||||
} else {
|
||||
|
|
@ -750,11 +730,8 @@ is_identical_to_previous <- function(data, no.name = TRUE) {
|
|||
#'
|
||||
#' @examples
|
||||
#' c("foo bar", "fooBar21", "!!Foo'B'a-r", "foo_bar", "F OO bar") |> simple_snake()
|
||||
simple_snake <- function(data) {
|
||||
gsub("[\\s+]",
|
||||
"_",
|
||||
gsub("[^\\w\\s:-]", "", tolower(data), perl = TRUE),
|
||||
perl = TRUE)
|
||||
simple_snake <- function(data){
|
||||
gsub("[\\s+]","_",gsub("[^\\w\\s:-]", "", tolower(data), perl=TRUE), perl=TRUE)
|
||||
}
|
||||
|
||||
#' Data type assessment.
|
||||
|
|
@ -791,8 +768,7 @@ data_type <- function(data) {
|
|||
out <- "empty"
|
||||
} else if (l_unique < 2) {
|
||||
out <- "monotone"
|
||||
} else if (any(c("factor", "logical") %in% cl_d) |
|
||||
l_unique == 2) {
|
||||
} else if (any(c("factor", "logical") %in% cl_d) | l_unique == 2) {
|
||||
if (identical("logical", cl_d) | l_unique == 2) {
|
||||
out <- "dichotomous"
|
||||
} else {
|
||||
|
|
@ -828,17 +804,13 @@ data_type <- function(data) {
|
|||
#' data_types()
|
||||
data_types <- function() {
|
||||
list(
|
||||
"empty" = list(descr = "Variable of all NAs", classes = "Any class"),
|
||||
"monotone" = list(descr = "Variable with only one unique value", classes =
|
||||
"Any class"),
|
||||
"dichotomous" = list(descr = "Variable with only two unique values", classes =
|
||||
"Any class"),
|
||||
"categorical" = list(descr = "Factor variable", classes = "factor (ordered or unordered)"),
|
||||
"text" = list(descr = "Character variable", classes = "character"),
|
||||
"datetime" = list(descr = "Variable of time, date or datetime values", classes =
|
||||
"hms, Date, POSIXct and POSIXt"),
|
||||
"continuous" = list(descr = "Numeric variable", classes = "numeric, integer or double"),
|
||||
"unknown" = list(descr = "Anything not falling within the previous", classes =
|
||||
"Any other class")
|
||||
"empty" = list(descr="Variable of all NAs",classes="Any class"),
|
||||
"monotone" = list(descr="Variable with only one unique value",classes="Any class"),
|
||||
"dichotomous" = list(descr="Variable with only two unique values",classes="Any class"),
|
||||
"categorical"= list(descr="Factor variable",classes="factor (ordered or unordered)"),
|
||||
"text"= list(descr="Character variable",classes="character"),
|
||||
"datetime"= list(descr="Variable of time, date or datetime values",classes="hms, Date, POSIXct and POSIXt"),
|
||||
"continuous"= list(descr="Numeric variable",classes="numeric, integer or double"),
|
||||
"unknown"= list(descr="Anything not falling within the previous",classes="Any other class")
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
hosted_version <- function()'v26.2.2-260223'
|
||||
hosted_version <- function()'v26.1.2-260112'
|
||||
|
|
|
|||
|
|
@ -14,18 +14,8 @@
|
|||
import_file_ui <- function(id,
|
||||
title = "",
|
||||
preview_data = TRUE,
|
||||
file_extensions = c(".csv",
|
||||
".txt",
|
||||
".xls",
|
||||
".xlsx",
|
||||
".rds",
|
||||
".fst",
|
||||
".sas7bdat",
|
||||
".sav"),
|
||||
layout_params = c("dropdown", "inline"),
|
||||
limit_default = 10000,
|
||||
limit_upper = 10000,
|
||||
limit_lower = 0) {
|
||||
file_extensions = c(".csv", ".txt", ".xls", ".xlsx", ".rds", ".fst", ".sas7bdat", ".sav"),
|
||||
layout_params = c("dropdown", "inline")) {
|
||||
ns <- shiny::NS(id)
|
||||
|
||||
if (!is.null(layout_params)) {
|
||||
|
|
@ -33,7 +23,10 @@ import_file_ui <- function(id,
|
|||
}
|
||||
|
||||
if (isTRUE(title)) {
|
||||
title <- shiny::tags$h4("Import a file", class = "datamods-title")
|
||||
title <- shiny::tags$h4(
|
||||
"Import a file",
|
||||
class = "datamods-title"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -58,26 +51,7 @@ import_file_ui <- function(id,
|
|||
size = "sm",
|
||||
width = "100%"
|
||||
),
|
||||
shiny::helpText(
|
||||
phosphoricons::ph("info"),
|
||||
i18n$t("if several use a comma (',') to separate them")
|
||||
)
|
||||
),
|
||||
shiny::tagAppendChild(
|
||||
shinyWidgets::numericInputIcon(
|
||||
inputId = ns("size_limit"),
|
||||
label = i18n$t("Maximum number of observations:"),
|
||||
value = limit_default,
|
||||
min = limit_lower,
|
||||
max = limit_upper,
|
||||
icon = list("n ="),
|
||||
size = "sm",
|
||||
width = "100%"
|
||||
),
|
||||
shiny::helpText(
|
||||
phosphoricons::ph("info"),
|
||||
i18n$t("setting to 0 includes all")
|
||||
)
|
||||
shiny::helpText(phosphoricons::ph("info"), i18n$t("if several use a comma (',') to separate them"))
|
||||
)
|
||||
),
|
||||
shiny::column(
|
||||
|
|
@ -93,7 +67,10 @@ import_file_ui <- function(id,
|
|||
selectInputIcon(
|
||||
inputId = ns("encoding"),
|
||||
label = i18n$t("Encoding:"),
|
||||
choices = c("UTF-8" = "UTF-8", "Latin1" = "latin1"),
|
||||
choices = c(
|
||||
"UTF-8" = "UTF-8",
|
||||
"Latin1" = "latin1"
|
||||
),
|
||||
icon = phosphoricons::ph("text-aa"),
|
||||
size = "sm",
|
||||
width = "100%"
|
||||
|
|
@ -147,8 +124,7 @@ import_file_ui <- function(id,
|
|||
datamods:::html_dependency_datamods(),
|
||||
title,
|
||||
file_ui,
|
||||
if (identical(layout_params, "inline"))
|
||||
params_ui,
|
||||
if (identical(layout_params, "inline")) params_ui,
|
||||
shiny::tags$div(
|
||||
class = "hidden",
|
||||
id = ns("sheet-container"),
|
||||
|
|
@ -168,8 +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
|
||||
)
|
||||
|
|
@ -202,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",
|
||||
|
|
@ -220,12 +196,7 @@ import_file_server <- function(id,
|
|||
module <- function(input, output, session) {
|
||||
ns <- session$ns
|
||||
imported_rv <- shiny::reactiveValues(data = NULL, name = NULL)
|
||||
temporary_rv <- shiny::reactiveValues(
|
||||
data = NULL,
|
||||
name = NULL,
|
||||
status = NULL,
|
||||
sheets = 1
|
||||
)
|
||||
temporary_rv <- shiny::reactiveValues(data = NULL, name = NULL, status = NULL, sheets = 1)
|
||||
|
||||
shiny::observeEvent(reset(), {
|
||||
temporary_rv$data <- NULL
|
||||
|
|
@ -274,12 +245,10 @@ import_file_server <- function(id,
|
|||
input$skip_rows,
|
||||
input$dec,
|
||||
input$encoding,
|
||||
input$na_label,
|
||||
input$size_limit
|
||||
input$na_label
|
||||
),
|
||||
{
|
||||
req(input$file)
|
||||
req(input$size_limit)
|
||||
|
||||
if (!all(input$sheet %in% temporary_rv$sheets)) {
|
||||
sheets <- 1
|
||||
|
|
@ -321,17 +290,16 @@ import_file_server <- function(id,
|
|||
datamods:::insert_alert(
|
||||
selector = ns("import"),
|
||||
status = "success",
|
||||
make_success_alert(
|
||||
data = imported,
|
||||
datamods:::make_success_alert(
|
||||
imported,
|
||||
trigger_return = trigger_return,
|
||||
btn_show_data = btn_show_data,
|
||||
extra = if (isTRUE(input$preview_data))
|
||||
i18n$t("First five rows are shown below:")
|
||||
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 = input$size_limit)
|
||||
imported <- limit_data_size(imported,limit = limit)
|
||||
|
||||
temporary_rv$status <- "success"
|
||||
temporary_rv$data <- imported
|
||||
|
|
@ -343,35 +311,34 @@ import_file_server <- function(id,
|
|||
)
|
||||
|
||||
observeEvent(input$see_data, {
|
||||
tryCatch({
|
||||
datamods:::show_data(
|
||||
default_parsing(temporary_rv$data),
|
||||
title = i18n$t("Imported data"),
|
||||
type = show_data_in
|
||||
)
|
||||
}, # warning = function(warn) {
|
||||
# showNotification(warn, type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(err, type = "err")
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
datamods:::show_data(default_parsing(temporary_rv$data), title = i18n$t("Imported data"), type = show_data_in)
|
||||
},
|
||||
# warning = function(warn) {
|
||||
# showNotification(warn, type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(err, type = "err")
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
output$table <- toastui::renderDatagrid2({
|
||||
req(temporary_rv$data)
|
||||
tryCatch({
|
||||
toastui::datagrid(
|
||||
data = setNames(
|
||||
head(temporary_rv$data, 5),
|
||||
make.names(names(temporary_rv$data), unique = TRUE)
|
||||
),
|
||||
theme = "striped",
|
||||
colwidths = "guess",
|
||||
minBodyHeight = 250
|
||||
)
|
||||
}, error = function(err) {
|
||||
showNotification(err, type = "err")
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
toastui::datagrid(
|
||||
data = setNames(head(temporary_rv$data, 5), make.names(names(temporary_rv$data), unique = TRUE)),
|
||||
theme = "striped",
|
||||
colwidths = "guess",
|
||||
minBodyHeight = 250
|
||||
)
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(err, type = "err")
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
observeEvent(input$confirm, {
|
||||
|
|
@ -397,7 +364,10 @@ import_file_server <- function(id,
|
|||
}
|
||||
}
|
||||
|
||||
moduleServer(id = id, module = module)
|
||||
moduleServer(
|
||||
id = id,
|
||||
module = module
|
||||
)
|
||||
}
|
||||
|
||||
# utils -------------------------------------------------------------------
|
||||
|
|
@ -456,37 +426,39 @@ import_delim <- function(file, skip, encoding, na.strings) {
|
|||
#' @export
|
||||
#'
|
||||
import_xls <- function(file, sheet, skip, na.strings) {
|
||||
tryCatch({
|
||||
## If sheet is null, this allows purrr::map to run
|
||||
if (is.null(sheet))
|
||||
sheet <- 1
|
||||
tryCatch(
|
||||
{
|
||||
## If sheet is null, this allows purrr::map to run
|
||||
if (is.null(sheet)) sheet <- 1
|
||||
|
||||
sheet |>
|
||||
purrr::map(\(.x) {
|
||||
readxl::read_excel(
|
||||
path = file,
|
||||
sheet = .x,
|
||||
na = na.strings,
|
||||
skip = skip,
|
||||
.name_repair = "unique_quiet",
|
||||
trim_ws = TRUE
|
||||
)
|
||||
sheet |>
|
||||
purrr::map(\(.x){
|
||||
readxl::read_excel(
|
||||
path = file,
|
||||
sheet = .x,
|
||||
na = na.strings,
|
||||
skip = skip,
|
||||
.name_repair = "unique_quiet",
|
||||
trim_ws = TRUE
|
||||
)
|
||||
|
||||
# openxlsx2::read_xlsx(
|
||||
# file = file,
|
||||
# sheet = .x,
|
||||
# skip_empty_rows = TRUE,
|
||||
# start_row = skip - 1,
|
||||
# na.strings = na.strings
|
||||
# )
|
||||
}) |>
|
||||
purrr::reduce(dplyr::full_join)
|
||||
}, # warning = function(warn) {
|
||||
# showNotification(paste0(warn), type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(paste0(err), type = "err")
|
||||
})
|
||||
# openxlsx2::read_xlsx(
|
||||
# file = file,
|
||||
# sheet = .x,
|
||||
# skip_empty_rows = TRUE,
|
||||
# start_row = skip - 1,
|
||||
# na.strings = na.strings
|
||||
# )
|
||||
}) |>
|
||||
purrr::reduce(dplyr::full_join)
|
||||
},
|
||||
# warning = function(warn) {
|
||||
# showNotification(paste0(warn), type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(paste0(err), type = "err")
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -496,25 +468,27 @@ import_xls <- function(file, sheet, skip, na.strings) {
|
|||
#' @export
|
||||
#'
|
||||
import_ods <- function(file, sheet, skip, na.strings) {
|
||||
tryCatch({
|
||||
if (is.null(sheet))
|
||||
sheet <- 1
|
||||
sheet |>
|
||||
purrr::map(\(.x) {
|
||||
readODS::read_ods(
|
||||
path = file,
|
||||
sheet = .x,
|
||||
skip = skip,
|
||||
na = na.strings
|
||||
)
|
||||
}) |>
|
||||
purrr::reduce(dplyr::full_join)
|
||||
}, # warning = function(warn) {
|
||||
# showNotification(paste0(warn), type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(paste0(err), type = "err")
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
if (is.null(sheet)) sheet <- 1
|
||||
sheet |>
|
||||
purrr::map(\(.x){
|
||||
readODS::read_ods(
|
||||
path = file,
|
||||
sheet = .x,
|
||||
skip = skip,
|
||||
na = na.strings
|
||||
)
|
||||
}) |>
|
||||
purrr::reduce(dplyr::full_join)
|
||||
},
|
||||
# warning = function(warn) {
|
||||
# showNotification(paste0(warn), type = "warning")
|
||||
# },
|
||||
error = function(err) {
|
||||
showNotification(paste0(err), type = "err")
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#' @name import-file-type
|
||||
|
|
@ -523,7 +497,10 @@ import_ods <- function(file, sheet, skip, na.strings) {
|
|||
#' @export
|
||||
#'
|
||||
import_dta <- function(file) {
|
||||
haven::read_dta(file = file, .name_repair = "unique_quiet")
|
||||
haven::read_dta(
|
||||
file = file,
|
||||
.name_repair = "unique_quiet"
|
||||
)
|
||||
}
|
||||
|
||||
#' @name import-file-type
|
||||
|
|
@ -532,7 +509,9 @@ import_dta <- function(file) {
|
|||
#' @export
|
||||
#'
|
||||
import_rds <- function(file) {
|
||||
out <- readr::read_rds(file = file)
|
||||
out <- readr::read_rds(
|
||||
file = file
|
||||
)
|
||||
|
||||
if (is.data.frame(out)) {
|
||||
out
|
||||
|
|
@ -607,17 +586,7 @@ import_file_demo_app <- function() {
|
|||
width = 4,
|
||||
import_file_ui(
|
||||
id = "myid",
|
||||
file_extensions = c(
|
||||
".csv",
|
||||
".tsv",
|
||||
".txt",
|
||||
".xls",
|
||||
".xlsx",
|
||||
".rds",
|
||||
".sas7bdat",
|
||||
".ods",
|
||||
".dta"
|
||||
),
|
||||
file_extensions = c(".csv", ".tsv", ".txt", ".xls", ".xlsx", ".rds", ".sas7bdat", ".ods", ".dta"),
|
||||
layout_params = "dropdown" # "inline" # or "dropdown"
|
||||
)
|
||||
),
|
||||
|
|
@ -665,7 +634,6 @@ import_file_demo_app <- function() {
|
|||
#' 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.
|
||||
#' If limit is set to 0 or NULL, the original data set is returned.
|
||||
#'
|
||||
#'
|
||||
#' @param data data.frame
|
||||
|
|
@ -676,68 +644,21 @@ import_file_demo_app <- function() {
|
|||
#'
|
||||
#' @examples
|
||||
#' prod(dim(mtcars))
|
||||
#' limit_data_size(mtcars,2)
|
||||
#' limit_data_size(mtcars)
|
||||
#' limit_data_size(mtcars,100)
|
||||
limit_data_size <- function(data, limit = NULL) {
|
||||
## Add security to reduce large datasets to n observations below limit.
|
||||
## Add security to only allow dataset of 100.000 cells
|
||||
## Ideally this should only go for the hosted version
|
||||
|
||||
if (is.null(limit) || limit == 0) {
|
||||
if (is.null(limit)){
|
||||
return(data)
|
||||
}
|
||||
|
||||
data_dim <- dim(data)
|
||||
|
||||
## If the limit is below nrow, the first observations from the first row
|
||||
## is included for a very pessimistic selection.
|
||||
## A more optimistic selection would just use ceiling instead of floor.
|
||||
if (limit < data_dim[2]) {
|
||||
head(data, 1)[seq_len(limit)]
|
||||
} else if (prod(data_dim) > limit) {
|
||||
if (prod(data_dim) > limit) {
|
||||
head(data, floor(limit / data_dim[2]))
|
||||
} else {
|
||||
data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#' @importFrom htmltools tagList tags
|
||||
#' @importFrom shiny icon getDefaultReactiveDomain
|
||||
make_success_alert <- function(data,
|
||||
trigger_return,
|
||||
btn_show_data,
|
||||
extra = NULL,
|
||||
session = shiny::getDefaultReactiveDomain()) {
|
||||
if (identical(trigger_return, "button")) {
|
||||
success_message <- tagList(tags$b(
|
||||
phosphoricons::ph("check", weight = "bold"),
|
||||
i18n$t("Data ready to be imported!")
|
||||
),
|
||||
sprintf(
|
||||
i18n$t("Data has %s obs. of %s variables."),
|
||||
nrow(data),
|
||||
ncol(data)
|
||||
),
|
||||
extra)
|
||||
} else {
|
||||
success_message <- tagList(tags$b(
|
||||
phosphoricons::ph("check", weight = "bold"),
|
||||
i18n$t("Data successfully imported!")
|
||||
),
|
||||
sprintf(
|
||||
i18n$t("Data has %s obs. of %s variables."),
|
||||
nrow(data),
|
||||
ncol(data)
|
||||
),
|
||||
extra)
|
||||
}
|
||||
if (isTRUE(btn_show_data)) {
|
||||
success_message <- tagList(success_message,
|
||||
tags$br(),
|
||||
actionLink(
|
||||
inputId = session$ns("see_data"),
|
||||
label = tagList(phosphoricons::ph("table"), i18n$t("Click to see data"))
|
||||
))
|
||||
}
|
||||
return(success_message)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
|
||||
|
||||
#' @title Import data from an Environment
|
||||
#'
|
||||
#' @description Let the user select a dataset from its own environment or from a package's environment.
|
||||
|
|
@ -20,6 +18,7 @@ import_globalenv_ui <- function(id,
|
|||
globalenv = TRUE,
|
||||
packages = datamods::get_data_packages(),
|
||||
title = TRUE) {
|
||||
|
||||
ns <- NS(id)
|
||||
|
||||
choices <- list()
|
||||
|
|
@ -32,14 +31,15 @@ import_globalenv_ui <- function(id,
|
|||
|
||||
if (isTRUE(globalenv)) {
|
||||
selected <- "Global Environment"
|
||||
select_label <- i18n$t("Select a dataset from your environment or sample dataset from a package.")
|
||||
} else {
|
||||
selected <- packages[1]
|
||||
select_label <- i18n$t("Select a sample dataset from a package.")
|
||||
}
|
||||
|
||||
if (isTRUE(title)) {
|
||||
title <- tags$h4(i18n$t("Import a dataset from an environment"), class = "datamods-title")
|
||||
title <- tags$h4(
|
||||
i18n$t("Import a dataset from an environment"),
|
||||
class = "datamods-title"
|
||||
)
|
||||
}
|
||||
|
||||
tags$div(
|
||||
|
|
@ -66,13 +66,14 @@ import_globalenv_ui <- function(id,
|
|||
# options = list(title = i18n$t("List of datasets...")),
|
||||
width = "100%"
|
||||
),
|
||||
|
||||
tags$div(
|
||||
id = ns("import-placeholder"),
|
||||
shinyWidgets::alert(
|
||||
id = ns("import-result"),
|
||||
status = "info",
|
||||
tags$b(i18n$t("No data selected!")),
|
||||
select_label,
|
||||
i18n$t("Use a dataset from your environment or from the environment of a package."),
|
||||
dismissible = TRUE
|
||||
)
|
||||
),
|
||||
|
|
@ -86,14 +87,12 @@ import_globalenv_ui <- function(id,
|
|||
|
||||
|
||||
#' @param btn_show_data Display or not a button to display data in a modal window if import is successful.
|
||||
#'
|
||||
#' @param show_data_in Where to display data: in a `"popup"` or in a `"modal"` window.
|
||||
#' @param trigger_return When to update selected data:
|
||||
#' `"button"` (when user click on button) or
|
||||
#' `"change"` (each time user select a dataset in the list).
|
||||
#' @param return_class Class of returned data: `data.frame`, `data.table`, `tbl_df` (tibble) or `raw`.
|
||||
#' @param reset A `reactive` function that when triggered resets the data.
|
||||
#' @param limit_data upper limit to imported data
|
||||
#'
|
||||
#' @export
|
||||
#'
|
||||
|
|
@ -107,17 +106,16 @@ import_globalenv_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),
|
||||
limit_data = NULL) {
|
||||
reset = reactive(NULL)) {
|
||||
|
||||
trigger_return <- match.arg(trigger_return)
|
||||
return_class <- match.arg(return_class)
|
||||
|
||||
module <- function(input, output, session) {
|
||||
|
||||
ns <- session$ns
|
||||
imported_rv <- reactiveValues(data = NULL, name = NULL)
|
||||
temporary_rv <- reactiveValues(data = NULL,
|
||||
name = NULL,
|
||||
status = NULL)
|
||||
temporary_rv <- reactiveValues(data = NULL, name = NULL, status = NULL)
|
||||
|
||||
observeEvent(reset(), {
|
||||
temporary_rv$data <- NULL
|
||||
|
|
@ -132,7 +130,6 @@ import_globalenv_server <- function(id,
|
|||
})
|
||||
|
||||
observeEvent(input$env, {
|
||||
# browser()
|
||||
if (identical(input$env, "Global Environment")) {
|
||||
choices <- datamods:::search_obj("data.frame")
|
||||
} else {
|
||||
|
|
@ -142,14 +139,9 @@ import_globalenv_server <- function(id,
|
|||
choices <- i18n$t("No dataset here...")
|
||||
choicesOpt <- list(disabled = TRUE)
|
||||
} else {
|
||||
choicesOpt <- list(subtext = get_dimensions(choices,filter_df=TRUE))
|
||||
# browser()
|
||||
## choices are corrected if GlobalEnv is not chosen
|
||||
if (!identical(input$env, "Global Environment")) {
|
||||
choices <- structure(names(choicesOpt$subtext),
|
||||
package = attr(choices, "package"))
|
||||
}
|
||||
|
||||
choicesOpt <- list(
|
||||
subtext = datamods:::get_dimensions(choices)
|
||||
)
|
||||
}
|
||||
temporary_rv$package <- attr(choices, "package")
|
||||
shinyWidgets::updatePickerInput(
|
||||
|
|
@ -160,8 +152,7 @@ import_globalenv_server <- function(id,
|
|||
choicesOpt = choicesOpt,
|
||||
options = list(
|
||||
title = i18n$t("List of datasets..."),
|
||||
"live-search" = TRUE
|
||||
)
|
||||
"live-search" = TRUE)
|
||||
)
|
||||
})
|
||||
|
||||
|
|
@ -170,9 +161,7 @@ import_globalenv_server <- function(id,
|
|||
id = "import-result",
|
||||
status = "info",
|
||||
tags$b(i18n$t("No data selected!")),
|
||||
i18n$t(
|
||||
"Use a dataset from your environment or from the environment of a package."
|
||||
),
|
||||
i18n$t("Use a dataset from your environment or from the environment of a package."),
|
||||
dismissible = TRUE
|
||||
)
|
||||
)
|
||||
|
|
@ -186,68 +175,58 @@ import_globalenv_server <- function(id,
|
|||
|
||||
|
||||
|
||||
observeEvent(input$data,
|
||||
{
|
||||
if (!isTruthy(input$data)) {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = FALSE)
|
||||
datamods:::insert_alert(
|
||||
selector = ns("import"),
|
||||
status = "info",
|
||||
tags$b(i18n$t("No data selected!")),
|
||||
i18n$t(
|
||||
"Use a dataset from your environment or from the environment of a package."
|
||||
)
|
||||
)
|
||||
} else {
|
||||
# browser()
|
||||
name_df <- input$data
|
||||
observeEvent(input$data, {
|
||||
if (!isTruthy(input$data)) {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = FALSE)
|
||||
datamods:::insert_alert(
|
||||
selector = ns("import"),
|
||||
status = "info",
|
||||
tags$b(i18n$t("No data selected!")),
|
||||
i18n$t("Use a dataset from your environment or from the environment of a package.")
|
||||
)
|
||||
} else {
|
||||
name_df <- input$data
|
||||
|
||||
if (!is.null(temporary_rv$package)) {
|
||||
attr(name_df, "package") <- temporary_rv$package
|
||||
}
|
||||
if (!is.null(temporary_rv$package)) {
|
||||
attr(name_df, "package") <- temporary_rv$package
|
||||
}
|
||||
|
||||
imported <- try(get_env_data(name_df), silent = TRUE)
|
||||
imported <- try(get_env_data(name_df), silent = TRUE)
|
||||
|
||||
if (inherits(imported, "try-error") ||
|
||||
NROW(imported) < 1) {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = FALSE)
|
||||
datamods:::insert_error(mssg = i18n$t(attr(imported, "condition")$message))
|
||||
temporary_rv$status <- "error"
|
||||
temporary_rv$data <- NULL
|
||||
temporary_rv$name <- NULL
|
||||
} else {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = TRUE)
|
||||
datamods:::insert_alert(
|
||||
selector = ns("import"),
|
||||
status = "success",
|
||||
make_success_alert(
|
||||
data = imported,
|
||||
trigger_return = trigger_return,
|
||||
btn_show_data = btn_show_data
|
||||
)
|
||||
)
|
||||
pkg <- attr(name_df, "package")
|
||||
if (!is.null(pkg)) {
|
||||
name <- paste(pkg, input$data, sep = "::")
|
||||
} else {
|
||||
name <- input$data
|
||||
}
|
||||
name <- trimws(sub("\\(([^\\)]+)\\)", "", name))
|
||||
temporary_rv$status <- "success"
|
||||
|
||||
temporary_rv$data <- limit_data_size(imported,limit = limit_data)
|
||||
temporary_rv$name <- name
|
||||
}
|
||||
}
|
||||
},
|
||||
ignoreInit = TRUE,
|
||||
ignoreNULL = FALSE)
|
||||
if (inherits(imported, "try-error") || NROW(imported) < 1) {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = FALSE)
|
||||
datamods:::insert_error(mssg = i18n$t(attr(imported, "condition")$message))
|
||||
temporary_rv$status <- "error"
|
||||
temporary_rv$data <- NULL
|
||||
temporary_rv$name <- NULL
|
||||
} else {
|
||||
datamods:::toggle_widget(inputId = "confirm", enable = TRUE)
|
||||
datamods:::insert_alert(
|
||||
selector = ns("import"),
|
||||
status = "success",
|
||||
datamods:::make_success_alert(
|
||||
imported,
|
||||
trigger_return = trigger_return,
|
||||
btn_show_data = btn_show_data
|
||||
)
|
||||
)
|
||||
pkg <- attr(name_df, "package")
|
||||
if (!is.null(pkg)) {
|
||||
name <- paste(pkg, input$data, sep = "::")
|
||||
} else {
|
||||
name <- input$data
|
||||
}
|
||||
name <- trimws(sub("\\(([^\\)]+)\\)", "", name))
|
||||
temporary_rv$status <- "success"
|
||||
temporary_rv$data <- imported
|
||||
temporary_rv$name <- name
|
||||
}
|
||||
}
|
||||
}, ignoreInit = TRUE, ignoreNULL = FALSE)
|
||||
|
||||
|
||||
observeEvent(input$see_data, {
|
||||
show_data(temporary_rv$data,
|
||||
title = i18n$t("Imported data"),
|
||||
type = show_data_in)
|
||||
show_data(temporary_rv$data, title = i18n$t("Imported data"), type = show_data_in)
|
||||
})
|
||||
|
||||
observeEvent(input$confirm, {
|
||||
|
|
@ -271,7 +250,10 @@ import_globalenv_server <- function(id,
|
|||
}
|
||||
}
|
||||
|
||||
moduleServer(id = id, module = module)
|
||||
moduleServer(
|
||||
id = id,
|
||||
module = module
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -318,7 +300,6 @@ get_data_packages <- function() {
|
|||
#' list_pkg_data("ggplot2")
|
||||
list_pkg_data <- function(pkg) {
|
||||
if (isTRUE(requireNamespace(pkg, quietly = TRUE))) {
|
||||
# browser()
|
||||
list_data <- data(package = pkg, envir = environment())$results[, "Item"]
|
||||
list_data <- sort(list_data)
|
||||
attr(list_data, "package") <- pkg
|
||||
|
|
@ -336,27 +317,17 @@ list_pkg_data <- function(pkg) {
|
|||
get_env_data <- function(obj, env = globalenv()) {
|
||||
pkg <- attr(obj, "package")
|
||||
re <- regexpr(pattern = "\\(([^\\)]+)\\)", text = obj)
|
||||
obj_ <- substr(
|
||||
x = obj,
|
||||
start = re + 1,
|
||||
stop = re + attr(re, "match.length") - 2
|
||||
)
|
||||
obj <- gsub(pattern = "\\s.*",
|
||||
replacement = "",
|
||||
x = obj)
|
||||
obj_ <- substr(x = obj, start = re + 1, stop = re + attr(re, "match.length") - 2)
|
||||
obj <- gsub(pattern = "\\s.*", replacement = "", x = obj)
|
||||
if (obj %in% ls(name = env)) {
|
||||
get(x = obj, envir = env)
|
||||
} else if (!is.null(pkg) && !identical(pkg, "")) {
|
||||
res <- suppressWarnings(try(get(utils::data(
|
||||
list = obj,
|
||||
package = pkg,
|
||||
envir = environment()
|
||||
)), silent = TRUE))
|
||||
res <- suppressWarnings(try(
|
||||
get(utils::data(list = obj, package = pkg, envir = environment())), silent = TRUE
|
||||
))
|
||||
if (!inherits(res, "try-error"))
|
||||
return(res)
|
||||
data(list = obj_,
|
||||
package = pkg,
|
||||
envir = environment())
|
||||
data(list = obj_, package = pkg, envir = environment())
|
||||
get(obj, envir = environment())
|
||||
} else {
|
||||
NULL
|
||||
|
|
@ -364,23 +335,16 @@ get_env_data <- function(obj, env = globalenv()) {
|
|||
}
|
||||
|
||||
|
||||
#' Extension of the helper function from datamods
|
||||
#'
|
||||
#' @param objs objs
|
||||
#' @param filter_df flag to only include data frames
|
||||
#'
|
||||
#' @returns vector of data frames with the package names as attr
|
||||
get_dimensions <- function(objs,filter_df=TRUE) {
|
||||
if (is.null(objs)){
|
||||
get_dimensions <- function(objs) {
|
||||
if (is.null(objs))
|
||||
return(NULL)
|
||||
}
|
||||
dataframes_dims <- Map(
|
||||
f = function(name, pkg) {
|
||||
attr(name, "package") <- pkg
|
||||
tmp <- suppressWarnings(get_env_data(name))
|
||||
if (is.data.frame(tmp)) {
|
||||
sprintf("%d obs. of %d variables", nrow(tmp), ncol(tmp))
|
||||
} else if (isFALSE(filter_df)) {
|
||||
} else {
|
||||
i18n$t("Not a data.frame")
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ landing_page_ui <- function(i18n) {
|
|||
i18n$t("Start with FreesearchR for basic data evaluation and analysis."),
|
||||
i18n$t("The app contains a selelct number of features and will guide you through key analyses."),
|
||||
i18n$t("When you need more advanced tools, you'll be prepared to use R directly."),
|
||||
shiny::actionLink(inputId = "act_data",label = i18n$t("Start by loading data.")),
|
||||
style = "font-size: 1.2rem; color: #555;"
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@
|
|||
#' @description
|
||||
#' All data.frames in the global environment will be accessible through the app.
|
||||
#'
|
||||
#' @param include_globalenv flag to include global env (local data) as option
|
||||
#' when loading data
|
||||
#' @param data_limit_default default data set observations limit
|
||||
#' @param data_limit_upper data set observations upper limit
|
||||
#' @param data_limit_lower data set observations lower limit
|
||||
#' @param ... passed on to `shiny::runApp()`
|
||||
#'
|
||||
#' @returns shiny app
|
||||
|
|
@ -18,24 +13,13 @@
|
|||
#' data(mtcars)
|
||||
#' launch_FreesearchR(launch.browser = TRUE)
|
||||
#' }
|
||||
launch_FreesearchR <- function(inlcude_globalenv = TRUE,
|
||||
data_limit_default = 1000,
|
||||
data_limit_upper = 100000,
|
||||
data_limit_lower = 1,
|
||||
...) {
|
||||
global_freesearchR <- list(
|
||||
include_globalenv = include_globalenv,
|
||||
data_limit_default = data_limit_default,
|
||||
data_limit_upper = data_limit_upper,
|
||||
data_limit_lower = data_limit_lower
|
||||
)
|
||||
|
||||
launch_FreesearchR <- function(...){
|
||||
appDir <- system.file("apps", "FreesearchR", package = "FreesearchR")
|
||||
if (appDir == "") {
|
||||
stop("Could not find the app directory. Try re-installing `FreesearchR`.",
|
||||
call. = FALSE)
|
||||
stop("Could not find the app directory. Try re-installing `FreesearchR`.", call. = FALSE)
|
||||
}
|
||||
|
||||
a <- shiny::runApp(appDir = paste0(appDir, "/app.R"), ...)
|
||||
a <- shiny::runApp(appDir = paste0(appDir,"/app.R"), ...)
|
||||
return(invisible(a))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,49 +9,45 @@
|
|||
data_missings_ui <- function(id, ...) {
|
||||
ns <- shiny::NS(id)
|
||||
|
||||
list(bslib::layout_sidebar(
|
||||
uiOutput(outputId = ns("feedback")),
|
||||
sidebar = bslib::sidebar(
|
||||
bslib::accordion(
|
||||
id = ns("acc_mis"),
|
||||
open = "acc_chars",
|
||||
multiple = FALSE,
|
||||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("gear"),
|
||||
shiny::conditionalPanel(
|
||||
condition = "output.missings == true",
|
||||
list(
|
||||
bslib::layout_sidebar(
|
||||
sidebar = bslib::sidebar(
|
||||
bslib::accordion(
|
||||
id = ns("acc_mis"),
|
||||
open = "acc_chars",
|
||||
multiple = FALSE,
|
||||
bslib::accordion_panel(
|
||||
value = "acc_pan_mis",
|
||||
title = "Settings",
|
||||
icon = bsicons::bs_icon("gear"),
|
||||
shiny::uiOutput(ns("missings_method")),
|
||||
shiny::uiOutput(ns("missings_var")),
|
||||
ns = ns
|
||||
),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random."
|
||||
shiny::helpText(i18n$t("Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.")),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = ns("act_miss"),
|
||||
label = i18n$t("Evaluate"),
|
||||
width = "100%",
|
||||
icon = shiny::icon("calculator"),
|
||||
disabled = FALSE
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
shiny::actionButton(
|
||||
inputId = ns("act_miss"),
|
||||
label = i18n$t("Evaluate"),
|
||||
width = "100%",
|
||||
icon = shiny::icon("calculator"),
|
||||
disabled = TRUE
|
||||
do.call(
|
||||
bslib::accordion_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("file-earmark-arrow-down")
|
||||
),
|
||||
table_download_ui(id = ns("tbl_dwn"), title = NULL)
|
||||
)
|
||||
)
|
||||
),
|
||||
do.call(bslib::accordion_panel, c(
|
||||
list(
|
||||
title = "Download",
|
||||
icon = bsicons::bs_icon("file-earmark-arrow-down")
|
||||
),
|
||||
table_download_ui(id = ns("tbl_dwn"), title = NULL)
|
||||
))
|
||||
)
|
||||
),
|
||||
...,
|
||||
gt::gt_output(outputId = ns("missings_table"))
|
||||
))
|
||||
)
|
||||
),
|
||||
...,
|
||||
gt::gt_output(outputId = ns("missings_table"))
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
## This should really just be rebuild to only contain a function
|
||||
|
|
@ -63,71 +59,46 @@ data_missings_ui <- function(id, ...) {
|
|||
#' @name data-missings
|
||||
#' @returns shiny server module
|
||||
#' @export
|
||||
data_missings_server <- function(id, data, max_level = 20, ...) {
|
||||
data_missings_server <- function(id,
|
||||
data,
|
||||
max_level = 20,
|
||||
...) {
|
||||
shiny::moduleServer(
|
||||
id = id,
|
||||
module = function(input, output, session) {
|
||||
ns <- session$ns
|
||||
|
||||
datar <- if (is.reactive(data))
|
||||
data
|
||||
else
|
||||
reactive(data)
|
||||
datar <- if (is.reactive(data)) data else reactive(data)
|
||||
|
||||
rv <- shiny::reactiveValues(data = NULL,
|
||||
table = NULL,
|
||||
feedback = NULL)
|
||||
|
||||
## Case with no missings
|
||||
|
||||
info_alert <- shinyWidgets::alert(
|
||||
status = "info",
|
||||
phosphoricons::ph("question"),
|
||||
i18n$t("You have provided a complete dataset with no missing values.")
|
||||
rv <- shiny::reactiveValues(
|
||||
data = NULL,
|
||||
table = NULL
|
||||
)
|
||||
|
||||
output$missings <- shiny::reactive({
|
||||
# shiny::req(data())
|
||||
any(is.na(datar()))
|
||||
})
|
||||
shiny::outputOptions(output, "missings", suspendWhenHidden = FALSE)
|
||||
|
||||
shiny::observeEvent(list(datar(), input$missings_method, input$missings_var),
|
||||
{
|
||||
# shiny::req(data())
|
||||
# browser()
|
||||
if (!any(is.na(datar()))) {
|
||||
rv$feedback <- info_alert
|
||||
shiny::updateActionButton(inputId = "act_miss", disabled = TRUE)
|
||||
rv$table <- NULL
|
||||
output$missings_table <- gt::render_gt({ NULL })
|
||||
} else {
|
||||
rv$feedback <- NULL
|
||||
shiny::updateActionButton(inputId = "act_miss", disabled = FALSE)
|
||||
}
|
||||
},ignoreInit = TRUE)
|
||||
|
||||
|
||||
output$feedback <- renderUI(rv$feedback)
|
||||
|
||||
## Notes
|
||||
##
|
||||
## Code export is still missing
|
||||
## Direct table export would be nice
|
||||
|
||||
shiny::observe(output$missings_method <- shiny::renderUI({
|
||||
shiny::req(datar())
|
||||
vectorSelectInput(
|
||||
inputId = ns("missings_method"),
|
||||
label = i18n$t("Analysis method for missingness overview"),
|
||||
choices = setNames(c("predictors", "outcome"), c(
|
||||
i18n$t("Overview of missings across variables"),
|
||||
i18n$t(
|
||||
"Overview of difference in variables by missing status in outcome"
|
||||
shiny::observe(
|
||||
output$missings_method <- shiny::renderUI({
|
||||
shiny::req(data())
|
||||
vectorSelectInput(
|
||||
inputId = ns("missings_method"),
|
||||
label = i18n$t("Analysis method for missingness overview"),
|
||||
choices = setNames(
|
||||
c(
|
||||
"predictors",
|
||||
"outcome"
|
||||
),
|
||||
c(
|
||||
i18n$t("Overview of missings across variables"),
|
||||
i18n$t("Overview of difference in variables by missing status in outcome")
|
||||
)
|
||||
)
|
||||
))
|
||||
)
|
||||
}))
|
||||
)
|
||||
})
|
||||
)
|
||||
|
||||
shiny::observe({
|
||||
output$missings_var <- shiny::renderUI({
|
||||
|
|
@ -136,7 +107,7 @@ data_missings_server <- function(id, data, max_level = 20, ...) {
|
|||
# browser()
|
||||
if (input$missings_method == "predictors") {
|
||||
label <- i18n$t("Select a variable for grouped overview")
|
||||
df <- data_type_filter(datar(), type = c("categorical", "dichotomous"))
|
||||
df <- data_type_filter(data(), type = c("categorical", "dichotomous"))
|
||||
col_subset <- c("none", names(df))
|
||||
} else {
|
||||
label <- i18n$t("Select outcome variable for overview")
|
||||
|
|
@ -154,91 +125,94 @@ data_missings_server <- function(id, data, max_level = 20, ...) {
|
|||
})
|
||||
|
||||
|
||||
shiny::observeEvent(list(input$act_miss), {
|
||||
shiny::req(datar())
|
||||
shiny::req(input$missings_var)
|
||||
# browser()
|
||||
df_tbl <- datar()
|
||||
by_var <- input$missings_var
|
||||
shiny::observeEvent(
|
||||
list(input$act_miss),
|
||||
{
|
||||
shiny::req(datar())
|
||||
shiny::req(input$missings_var)
|
||||
# browser()
|
||||
df_tbl <- datar()
|
||||
by_var <- input$missings_var
|
||||
|
||||
parameters <- list(
|
||||
by_var = by_var,
|
||||
max_level = max_level,
|
||||
type = input$missings_method
|
||||
)
|
||||
parameters <- list(
|
||||
by_var = by_var,
|
||||
max_level = max_level,
|
||||
type = input$missings_method
|
||||
)
|
||||
|
||||
tryCatch({
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(compare_missings, modifyList(parameters, list(data = df_tbl)))
|
||||
})
|
||||
}, error = function(err) {
|
||||
showNotification(paste0("Error: ", err), type = "err")
|
||||
})
|
||||
tryCatch(
|
||||
{
|
||||
shiny::withProgress(message = i18n$t("Calculating. Hold tight for a moment.."), {
|
||||
out <- do.call(
|
||||
compare_missings,
|
||||
modifyList(parameters, list(data = df_tbl))
|
||||
)
|
||||
})
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste0("Error: ", err), type = "err")
|
||||
}
|
||||
)
|
||||
|
||||
if (is.null(input$missings_var) ||
|
||||
input$missings_var == "" ||
|
||||
!input$missings_var %in% names(datar()) ||
|
||||
input$missings_var == "none") {
|
||||
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
|
||||
# tbl <- rv$data()
|
||||
if (anyNA(datar())) {
|
||||
if (input$missings_method == "predictors") {
|
||||
title <- i18n$t("Overview of missing observations")
|
||||
if (is.null(input$missings_var) || input$missings_var == "" || !input$missings_var %in% names(datar()) || input$missings_var == "none") {
|
||||
# if (is.null(variabler()) || variabler() == "" || !variabler() %in% names(data()) || variabler() == "none") {
|
||||
# tbl <- rv$data()
|
||||
if (anyNA(datar())) {
|
||||
if (input$missings_method == "predictors") {
|
||||
title <- i18n$t("Overview of missing observations")
|
||||
} else {
|
||||
title <- i18n$t("No outcome measure chosen")
|
||||
}
|
||||
} else {
|
||||
title <- i18n$t("No outcome measure chosen")
|
||||
title <- i18n$t("No missing observations")
|
||||
}
|
||||
} else {
|
||||
title <- i18n$t("No missing observations")
|
||||
}
|
||||
} else {
|
||||
## Due to reactivity, the table updates too quickly. this mitigates that issue..
|
||||
if (input$missings_method == "predictors") {
|
||||
title <- glue::glue(
|
||||
i18n$t(
|
||||
"Missing observations across variables grouped by **'{input$missings_var}'**"
|
||||
)
|
||||
)
|
||||
} else {
|
||||
title <- glue::glue(
|
||||
i18n$t(
|
||||
"Differences by missing vs non-missing observations in **'{input$missings_var}'**"
|
||||
)
|
||||
)
|
||||
## Due to reactivity, the table updates too quickly. this mitigates that issue..
|
||||
|
||||
|
||||
if (input$missings_var == "predictors") {
|
||||
title <- glue::glue(i18n$t("Missings across variables by the variable **'{input$missings_var}'**"))
|
||||
} else {
|
||||
title <- glue::glue(i18n$t("Missing vs non-missing observations in the variable **'{input$missings_var}'**"))
|
||||
}
|
||||
}
|
||||
|
||||
attr(out, "tbl_title") <- title
|
||||
|
||||
rv$data <- shiny::reactive(out)
|
||||
}
|
||||
)
|
||||
|
||||
attr(out, "tbl_title") <- title
|
||||
|
||||
rv$data <- shiny::reactive(out)
|
||||
})
|
||||
|
||||
shiny::observeEvent(list(
|
||||
# input$act_miss
|
||||
rv$data
|
||||
), {
|
||||
output$missings_table <- gt::render_gt({
|
||||
shiny::req(rv$data)
|
||||
# shiny::req(input$missings_var)
|
||||
# browser()
|
||||
if ("p.value" %in% names(rv$data()[["table_body"]])) {
|
||||
tbl <- rv$data() |>
|
||||
gtsummary::bold_p()
|
||||
} else {
|
||||
tbl <- rv$data()
|
||||
}
|
||||
shiny::observeEvent(
|
||||
list(
|
||||
# input$act_miss
|
||||
rv$data
|
||||
),
|
||||
{
|
||||
output$missings_table <- gt::render_gt({
|
||||
shiny::req(rv$data)
|
||||
# shiny::req(input$missings_var)
|
||||
# browser()
|
||||
if ("p.value" %in% names(rv$data()[["table_body"]])) {
|
||||
tbl <- rv$data() |>
|
||||
gtsummary::bold_p()
|
||||
} else {
|
||||
tbl <- rv$data()
|
||||
}
|
||||
|
||||
|
||||
out <- tbl |>
|
||||
gtsummary::as_gt() |>
|
||||
gt::tab_header(title = gt::md(attr(tbl, "tbl_title")))
|
||||
out <- tbl |>
|
||||
gtsummary::as_gt() |>
|
||||
gt::tab_header(title = gt::md(attr(tbl, "tbl_title")))
|
||||
|
||||
attr(out, "strat_var") <- input$missings_var
|
||||
attr(out, "strat_var") <- input$missings_var
|
||||
|
||||
rv$table <- out
|
||||
rv$table <- out
|
||||
|
||||
out
|
||||
})
|
||||
})
|
||||
out
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
table_download_server(
|
||||
|
|
@ -254,20 +228,25 @@ data_missings_server <- function(id, data, max_level = 20, ...) {
|
|||
|
||||
|
||||
missing_demo_app <- function() {
|
||||
ui <- do.call(bslib::page, c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
))
|
||||
ui <- do.call(
|
||||
bslib::page,
|
||||
c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "data"),
|
||||
gt::gt_output("table_p")
|
||||
)
|
||||
)
|
||||
server <- function(input, output, session) {
|
||||
data_demo <- mtcars
|
||||
data_demo[sample(1:32, 10), "cyl"] <- NA
|
||||
data_demo[sample(1:32, 8), "vs"] <- NA
|
||||
|
||||
rv <- shiny::reactiveValues(table = NULL)
|
||||
rv <- shiny::reactiveValues(
|
||||
table = NULL
|
||||
)
|
||||
|
||||
rv$table <- data_missings_server(id = "data", data = data_demo)
|
||||
|
||||
|
|
@ -301,15 +280,17 @@ missing_demo_app <- function() {
|
|||
#' @returns gtsummary list object
|
||||
#' @export
|
||||
#'
|
||||
compare_missings <- function(data,
|
||||
by_var,
|
||||
max_level = 20,
|
||||
type = c("predictors", "outcome")) {
|
||||
compare_missings <- function(
|
||||
data,
|
||||
by_var,
|
||||
max_level = 20,
|
||||
type = c("predictors", "outcome")
|
||||
) {
|
||||
type <- match.arg(type)
|
||||
|
||||
if (!is.null(by_var) && by_var != "" && by_var %in% names(data)) {
|
||||
data <- data |>
|
||||
lapply(\(.x) {
|
||||
lapply(\(.x){
|
||||
if (is.factor(.x)) {
|
||||
cut_var(.x, breaks = 20, type = "top")
|
||||
} else {
|
||||
|
|
@ -353,7 +334,7 @@ compare_missings <- function(data,
|
|||
missings_logic_across <- function(data, exclude = NULL) {
|
||||
# This function includes a approach way to preserve variable labels
|
||||
names(data) |>
|
||||
lapply(\(.x) {
|
||||
lapply(\(.x){
|
||||
# browser()
|
||||
# Saving original labels
|
||||
lab <- REDCapCAST::get_attr(data[[.x]], attr = "label")
|
||||
|
|
@ -364,12 +345,7 @@ missings_logic_across <- function(data, exclude = NULL) {
|
|||
}
|
||||
if (!is.na(lab)) {
|
||||
# Restoring original labels, if not NA
|
||||
REDCapCAST::set_attr(
|
||||
data = out,
|
||||
label = lab,
|
||||
attr = "label",
|
||||
overwrite = TRUE
|
||||
)
|
||||
REDCapCAST::set_attr(data = out, label = lab, attr = "label", overwrite = TRUE)
|
||||
} else {
|
||||
out
|
||||
}
|
||||
|
|
|
|||
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
|
|
@ -7,3 +7,4 @@ language_choices <- function() {
|
|||
# "🇸🇪 Svenska" = "sv"
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
203
R/ui_elements.R
203
R/ui_elements.R
|
|
@ -25,7 +25,7 @@ ui_elements <- function(selection) {
|
|||
## Default just output "NULL"
|
||||
## This could probably be achieved more legantly, but this works.
|
||||
dev_banner(),
|
||||
landing_page_ui(i18n = i18n),
|
||||
landing_page_ui(i18n=i18n),
|
||||
# shiny::column(width = 2),
|
||||
# shiny::column(
|
||||
# width = 8,
|
||||
|
|
@ -68,11 +68,7 @@ ui_elements <- function(selection) {
|
|||
),
|
||||
# shiny::tags$script('document.querySelector("#source div").style.width = "100%"'),
|
||||
## Update this to change depending on run locally or hosted
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Upload a file, get data directly from REDCap or use local or sample data."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Upload a file, get data directly from REDCap or use local or sample data.")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::conditionalPanel(
|
||||
|
|
@ -81,11 +77,7 @@ ui_elements <- function(selection) {
|
|||
id = "file_import",
|
||||
layout_params = "dropdown",
|
||||
# title = "Choose a datafile to upload",
|
||||
file_extensions = c(".csv", ".tsv", ".txt", ".xls", ".xlsx", ".rds", ".ods", ".dta"),
|
||||
limit_default = global_freesearchR$data_limit_default,
|
||||
limit_lower = global_freesearchR$data_limit_lower,
|
||||
limit_upper = global_freesearchR$data_limit_upper
|
||||
|
||||
file_extensions = c(".csv", ".tsv", ".txt", ".xls", ".xlsx", ".rds", ".ods", ".dta")
|
||||
)
|
||||
),
|
||||
shiny::conditionalPanel(
|
||||
|
|
@ -98,15 +90,17 @@ ui_elements <- function(selection) {
|
|||
# shiny::HTML(i18n$t("<p>The <em><strong>FreesearchR</strong></em> app only stores data for analyses, but please only use with sensitive data when running locally. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Read more here</a></p>")),
|
||||
# dismissible = TRUE
|
||||
# ),
|
||||
m_redcap_readUI(id = "redcap_import", title = "")
|
||||
m_redcap_readUI(
|
||||
id = "redcap_import",
|
||||
title = ""
|
||||
)
|
||||
),
|
||||
shiny::conditionalPanel(
|
||||
condition = "input.source=='env'",
|
||||
import_globalenv_ui(
|
||||
id = "env",
|
||||
title = NULL,
|
||||
packages = c("NHANES", "stRoke", "datasets", "MASS"),
|
||||
globalenv = global_freesearchR$include_globalenv
|
||||
packages = c("NHANES", "stRoke", "datasets", "MASS")
|
||||
)
|
||||
),
|
||||
# shiny::conditionalPanel(
|
||||
|
|
@ -142,11 +136,7 @@ ui_elements <- function(selection) {
|
|||
format = shinyWidgets::wNumbFormat(decimals = 0),
|
||||
color = datamods:::get_primary_color()
|
||||
),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"At 0, only complete variables are included; at 100, all variables are included."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("At 0, only complete variables are included; at 100, all variables are included.")),
|
||||
shiny::br()
|
||||
),
|
||||
shiny::column(
|
||||
|
|
@ -195,9 +185,7 @@ ui_elements <- function(selection) {
|
|||
width = 9,
|
||||
shiny::uiOutput(outputId = "data_info", inline = TRUE),
|
||||
shiny::tags$p(
|
||||
i18n$t(
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters."
|
||||
)
|
||||
i18n$t("Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.")
|
||||
)
|
||||
),
|
||||
shiny::column(
|
||||
|
|
@ -233,18 +221,16 @@ ui_elements <- function(selection) {
|
|||
shiny::column(
|
||||
width = 3,
|
||||
shiny::tags$h6(i18n$t("Filter data types")),
|
||||
shiny::uiOutput(outputId = "column_filter"),
|
||||
## This needs to run in server for translation
|
||||
shiny::helpText(
|
||||
"Read more on how ",
|
||||
tags$a(
|
||||
"data types",
|
||||
href = "https://agdamsbo.github.io/FreesearchR/articles/data-types.html",
|
||||
target = "_blank",
|
||||
rel = "noopener noreferrer"
|
||||
),
|
||||
" are defined."
|
||||
shiny::uiOutput(
|
||||
outputId = "column_filter"
|
||||
),
|
||||
## This needs to run in server for translation
|
||||
shiny::helpText("Read more on how ", tags$a(
|
||||
"data types",
|
||||
href = "https://agdamsbo.github.io/FreesearchR/articles/data-types.html",
|
||||
target = "_blank",
|
||||
rel = "noopener noreferrer"
|
||||
), " are defined."),
|
||||
validation_ui("validation_var"),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
|
|
@ -264,26 +250,21 @@ ui_elements <- function(selection) {
|
|||
title = i18n$t("Edit and create data"),
|
||||
icon = shiny::icon("file-pen"),
|
||||
tags$h3(i18n$t("Subset, rename and convert variables")),
|
||||
fluidRow(shiny::column(
|
||||
width = 9, shiny::tags$p(
|
||||
i18n$t(
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."
|
||||
),
|
||||
i18n$t(
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."
|
||||
),
|
||||
i18n$t(
|
||||
"Please note that data modifications are applied before any filtering."
|
||||
fluidRow(
|
||||
shiny::column(
|
||||
width = 9,
|
||||
shiny::tags$p(
|
||||
i18n$t("Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.)."),
|
||||
i18n$t("There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data."),
|
||||
i18n$t("Please note that data modifications are applied before any filtering.")
|
||||
)
|
||||
)
|
||||
)),
|
||||
),
|
||||
update_variables_ui("modal_variables"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$h4(i18n$t("Advanced data manipulation")),
|
||||
shiny::tags$p(
|
||||
i18n$t("Below options allow more advanced varaible manipulations.")
|
||||
),
|
||||
shiny::tags$p(i18n$t("Below options allow more advanced varaible manipulations.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
|
|
@ -295,9 +276,7 @@ ui_elements <- function(selection) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(
|
||||
i18n$t("Reorder or rename the levels of factor/categorical variables.")
|
||||
),
|
||||
shiny::helpText(i18n$t("Reorder or rename the levels of factor/categorical variables.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
),
|
||||
|
|
@ -309,11 +288,7 @@ ui_elements <- function(selection) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Create factor/categorical variable from a continous variable (number/date/time).")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
),
|
||||
|
|
@ -325,9 +300,7 @@ ui_elements <- function(selection) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(i18n$t(
|
||||
"Split a text column by a recognised delimiter."
|
||||
)),
|
||||
shiny::helpText(i18n$t("Split a text column by a recognised delimiter.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
),
|
||||
|
|
@ -339,18 +312,16 @@ ui_elements <- function(selection) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(i18n$t(
|
||||
"Create a new variable based on an R-expression."
|
||||
)),
|
||||
shiny::helpText(i18n$t("Create a new variable based on an R-expression.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
)
|
||||
),
|
||||
tags$h4(i18n$t("Compare modified data to original")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$p(i18n$t(
|
||||
"Raw print of the original vs the modified data."
|
||||
)),
|
||||
shiny::tags$p(
|
||||
i18n$t("Raw print of the original vs the modified data.")
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
shiny::column(
|
||||
|
|
@ -371,11 +342,7 @@ ui_elements <- function(selection) {
|
|||
width = "100%"
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Reset to original imported dataset. Careful! There is no un-doing."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Reset to original imported dataset. Careful! There is no un-doing.")),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br()
|
||||
)
|
||||
|
|
@ -421,11 +388,7 @@ ui_elements <- function(selection) {
|
|||
# ),
|
||||
shiny::uiOutput("detail_level"),
|
||||
shiny::uiOutput("strat_var"),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.")),
|
||||
shiny::conditionalPanel(
|
||||
condition = "input.strat_var!='none'",
|
||||
shiny::radioButtons(
|
||||
|
|
@ -433,7 +396,10 @@ ui_elements <- function(selection) {
|
|||
label = i18n$t("Compare strata?"),
|
||||
selected = "no",
|
||||
inline = TRUE,
|
||||
choices = list("No" = "no", "Yes" = "yes")
|
||||
choices = list(
|
||||
"No" = "no",
|
||||
"Yes" = "yes"
|
||||
)
|
||||
),
|
||||
# shiny::helpText(i18n$t("Option to perform statistical comparisons between strata in baseline table.")),
|
||||
shiny::br(),
|
||||
|
|
@ -442,7 +408,10 @@ ui_elements <- function(selection) {
|
|||
label = i18n$t("Include group differences"),
|
||||
selected = "no",
|
||||
inline = TRUE,
|
||||
choices = list("No" = "no", "Yes" = "yes")
|
||||
choices = list(
|
||||
"No" = "no",
|
||||
"Yes" = "yes"
|
||||
)
|
||||
)
|
||||
),
|
||||
shiny::br(),
|
||||
|
|
@ -453,9 +422,7 @@ ui_elements <- function(selection) {
|
|||
icon = shiny::icon("calculator"),
|
||||
disabled = TRUE
|
||||
),
|
||||
shiny::helpText(i18n$t(
|
||||
"Press 'Evaluate' to create the comparison table."
|
||||
))
|
||||
shiny::helpText(i18n$t("Press 'Evaluate' to create the comparison table."))
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
@ -477,11 +444,7 @@ ui_elements <- function(selection) {
|
|||
title = "Settings",
|
||||
icon = bsicons::bs_icon("bounding-box"),
|
||||
shiny::uiOutput("outcome_var_cor"),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.")),
|
||||
shiny::br(),
|
||||
shinyWidgets::noUiSliderInput(
|
||||
inputId = "cor_cutoff",
|
||||
|
|
@ -493,22 +456,24 @@ ui_elements <- function(selection) {
|
|||
format = shinyWidgets::wNumbFormat(decimals = 2),
|
||||
color = datamods:::get_primary_color()
|
||||
),
|
||||
shiny::helpText(i18n$t(
|
||||
"Set the cut-off for considered 'highly correlated'."
|
||||
))
|
||||
shiny::helpText(i18n$t("Set the cut-off for considered 'highly correlated'."))
|
||||
)
|
||||
)
|
||||
),
|
||||
data_correlations_ui(id = "correlations", height = 600)
|
||||
)
|
||||
),
|
||||
do.call(bslib::nav_panel, c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "missingness", validation_ui("validation_mcar"))
|
||||
))
|
||||
do.call(
|
||||
bslib::nav_panel,
|
||||
c(
|
||||
list(
|
||||
title = i18n$t("Missings"),
|
||||
icon = bsicons::bs_icon("x-circle")
|
||||
),
|
||||
data_missings_ui(id = "missingness",
|
||||
validation_ui("validation_mcar"))
|
||||
)
|
||||
)
|
||||
),
|
||||
##############################################################################
|
||||
#########
|
||||
|
|
@ -543,7 +508,10 @@ ui_elements <- function(selection) {
|
|||
title = i18n$t("Regression"),
|
||||
icon = shiny::icon("calculator"),
|
||||
value = "nav_analyses",
|
||||
do.call(bslib::navset_card_tab, regression_ui("regression"))
|
||||
do.call(
|
||||
bslib::navset_card_tab,
|
||||
regression_ui("regression")
|
||||
)
|
||||
),
|
||||
##############################################################################
|
||||
#########
|
||||
|
|
@ -565,11 +533,7 @@ ui_elements <- function(selection) {
|
|||
shiny::column(
|
||||
width = 6,
|
||||
shiny::h4(i18n$t("Report")),
|
||||
shiny::helpText(
|
||||
i18n$t(
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
)
|
||||
),
|
||||
shiny::helpText(i18n$t("Choose your favourite output file format for further work, and download, when the analyses are done.")),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::selectInput(
|
||||
|
|
@ -597,9 +561,7 @@ ui_elements <- function(selection) {
|
|||
shiny::column(
|
||||
width = 6,
|
||||
shiny::h4("Data"),
|
||||
shiny::helpText(
|
||||
"Choose your favourite output data format to download the modified data."
|
||||
),
|
||||
shiny::helpText("Choose your favourite output data format to download the modified data."),
|
||||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::selectInput(
|
||||
|
|
@ -626,27 +588,16 @@ ui_elements <- function(selection) {
|
|||
shiny::br(),
|
||||
shiny::br(),
|
||||
shiny::h4("Code snippets"),
|
||||
shiny::tags$p(
|
||||
"Below are the code bits used to create the final data set and the main analyses."
|
||||
shiny::tags$p("Below are the code bits used to create the final data set and the main analyses."),
|
||||
shiny::tags$p("This can be used as a starting point for learning to code and for reproducibility."),
|
||||
shiny::tagList(
|
||||
lapply(
|
||||
paste0("code_", c(
|
||||
"import", "format", "data", "variables", "filter", "table1", "univariable", "multivariable"
|
||||
)),
|
||||
\(.x)shiny::htmlOutput(outputId = .x)
|
||||
)
|
||||
),
|
||||
shiny::tags$p(
|
||||
"This can be used as a starting point for learning to code and for reproducibility."
|
||||
),
|
||||
shiny::tagList(lapply(
|
||||
paste0(
|
||||
"code_",
|
||||
c(
|
||||
"import",
|
||||
"format",
|
||||
"data",
|
||||
"variables",
|
||||
"filter",
|
||||
"table1",
|
||||
"univariable",
|
||||
"multivariable"
|
||||
)
|
||||
), \(.x)shiny::htmlOutput(outputId = .x)
|
||||
)),
|
||||
shiny::tags$br(),
|
||||
shiny::br()
|
||||
),
|
||||
|
|
@ -662,8 +613,7 @@ ui_elements <- function(selection) {
|
|||
# shiny::img(shiny::icon("book")),
|
||||
shiny::tags$a(
|
||||
href = "https://redcap.au.dk/surveys/?s=JPCLPTXYDKFA8DA8",
|
||||
"Feedback",
|
||||
shiny::icon("arrow-up-right-from-square"),
|
||||
"Feedback", shiny::icon("arrow-up-right-from-square"),
|
||||
target = "_blank",
|
||||
rel = "noopener noreferrer"
|
||||
)
|
||||
|
|
@ -677,8 +627,7 @@ ui_elements <- function(selection) {
|
|||
# shiny::img(shiny::icon("book")),
|
||||
shiny::tags$a(
|
||||
href = "https://agdamsbo.github.io/FreesearchR/",
|
||||
"Docs",
|
||||
shiny::icon("arrow-up-right-from-square"),
|
||||
"Docs", shiny::icon("arrow-up-right-from-square"),
|
||||
target = "_blank",
|
||||
rel = "noopener noreferrer"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -78,10 +78,7 @@ update_factor_ui <- function(id) {
|
|||
),
|
||||
actionButton(
|
||||
inputId = ns("create"),
|
||||
label = tagList(
|
||||
phosphoricons::ph("arrow-clockwise"),
|
||||
i18n$t("Update factor variable")
|
||||
),
|
||||
label = tagList(phosphoricons::ph("arrow-clockwise"), i18n$t("Update factor variable")),
|
||||
class = "btn-outline-primary"
|
||||
)
|
||||
),
|
||||
|
|
@ -100,136 +97,154 @@ update_factor_ui <- function(id) {
|
|||
#'
|
||||
#' @rdname update-factor
|
||||
update_factor_server <- function(id, data_r = reactive(NULL)) {
|
||||
moduleServer(id, function(input, output, session) {
|
||||
rv <- reactiveValues(data = NULL, data_grid = NULL)
|
||||
moduleServer(
|
||||
id,
|
||||
function(input, output, session) {
|
||||
rv <- reactiveValues(data = NULL, data_grid = NULL)
|
||||
|
||||
bindEvent(observe({
|
||||
data <- data_r()
|
||||
rv$data <- data
|
||||
vars_factor <- vapply(data, is.factor, logical(1))
|
||||
vars_factor <- names(vars_factor)[vars_factor]
|
||||
updateVirtualSelect(
|
||||
inputId = "variable",
|
||||
choices = vars_factor,
|
||||
selected = if (isTruthy(input$variable))
|
||||
input$variable
|
||||
else
|
||||
vars_factor[1]
|
||||
)
|
||||
}), data_r(), input$hidden)
|
||||
bindEvent(observe({
|
||||
data <- data_r()
|
||||
rv$data <- data
|
||||
vars_factor <- vapply(data, is.factor, logical(1))
|
||||
vars_factor <- names(vars_factor)[vars_factor]
|
||||
updateVirtualSelect(
|
||||
inputId = "variable",
|
||||
choices = vars_factor,
|
||||
selected = if (isTruthy(input$variable)) input$variable else vars_factor[1]
|
||||
)
|
||||
}), data_r(), input$hidden)
|
||||
|
||||
observeEvent(input$variable, {
|
||||
data <- req(data_r())
|
||||
variable <- req(input$variable)
|
||||
grid <- as.data.frame(table(data[[variable]]))
|
||||
rv$data_grid <- grid
|
||||
})
|
||||
|
||||
observeEvent(input$sort_levels, {
|
||||
if (input$sort_levels %% 2 == 1) {
|
||||
decreasing <- FALSE
|
||||
label <- tagList(phosphoricons::ph("sort-descending"),
|
||||
i18n$t("Sort by Levels"))
|
||||
} else {
|
||||
decreasing <- TRUE
|
||||
label <- tagList(phosphoricons::ph("sort-ascending"),
|
||||
i18n$t("Sort by Levels"))
|
||||
}
|
||||
updateActionButton(inputId = "sort_levels", label = label)
|
||||
rv$data_grid <- rv$data_grid[order(rv$data_grid[[1]], decreasing = decreasing), ]
|
||||
})
|
||||
|
||||
observeEvent(input$sort_occurrences, {
|
||||
if (input$sort_occurrences %% 2 == 1) {
|
||||
decreasing <- FALSE
|
||||
label <- tagList(phosphoricons::ph("sort-descending"),
|
||||
i18n$t("Sort by count"))
|
||||
} else {
|
||||
decreasing <- TRUE
|
||||
label <- tagList(phosphoricons::ph("sort-ascending"),
|
||||
i18n$t("Sort by count"))
|
||||
}
|
||||
updateActionButton(inputId = "sort_occurrences", label = label)
|
||||
rv$data_grid <- rv$data_grid[order(rv$data_grid[[2]], decreasing = decreasing), ]
|
||||
})
|
||||
|
||||
|
||||
output$grid <- renderDatagrid({
|
||||
req(rv$data_grid)
|
||||
gridTheme <- getOption("datagrid.theme")
|
||||
if (length(gridTheme) < 1) {
|
||||
datamods:::apply_grid_theme()
|
||||
}
|
||||
on.exit(toastui::reset_grid_theme())
|
||||
data <- rv$data_grid
|
||||
data <- add_var_toset(data, "Var1", "New label")
|
||||
|
||||
grid <- datagrid(
|
||||
data = data,
|
||||
draggable = TRUE,
|
||||
sortable = FALSE,
|
||||
data_as_input = TRUE
|
||||
)
|
||||
grid <- grid_columns(
|
||||
grid,
|
||||
columns = c("Var1", "Var1_toset", "Freq"),
|
||||
header = c(i18n$t("Levels"), "New label", i18n$t("Count"))
|
||||
)
|
||||
grid <- grid_colorbar(
|
||||
grid,
|
||||
column = "Freq",
|
||||
label_outside = TRUE,
|
||||
label_width = "30px",
|
||||
background = "#D8DEE9",
|
||||
bar_bg = datamods:::get_primary_color(),
|
||||
from = c(0, max(rv$data_grid$Freq) + 1)
|
||||
)
|
||||
grid <- toastui::grid_style_column(grid = grid,
|
||||
column = "Var1_toset",
|
||||
fontStyle = "italic")
|
||||
grid <- toastui::grid_editor(grid = grid,
|
||||
column = "Var1_toset",
|
||||
type = "text")
|
||||
grid
|
||||
})
|
||||
|
||||
data_updated_r <- reactive({
|
||||
data <- req(data_r())
|
||||
variable <- req(input$variable)
|
||||
grid <- req(input$grid_data)
|
||||
|
||||
parameters <- list(
|
||||
variable = variable,
|
||||
new_variable = isTRUE(input$new_var) |
|
||||
any(grid[["Var1_toset"]] == "New label"),
|
||||
new_levels = as.character(grid[["Var1"]]),
|
||||
new_labels = as.character(grid[["Var1_toset"]]),
|
||||
ignore = "New label"
|
||||
)
|
||||
|
||||
data <- tryCatch({
|
||||
rlang::exec(factor_new_levels_labels,
|
||||
!!!modifyList(parameters, val = list(data = data)))
|
||||
}, error = function(err) {
|
||||
showNotification(paste(
|
||||
"We encountered the following error creating the new factor:",
|
||||
err
|
||||
),
|
||||
type = "err")
|
||||
observeEvent(input$variable, {
|
||||
data <- req(data_r())
|
||||
variable <- req(input$variable)
|
||||
grid <- as.data.frame(table(data[[variable]]))
|
||||
rv$data_grid <- grid
|
||||
})
|
||||
|
||||
# browser()
|
||||
code <- rlang::call2("factor_new_levels_labels", !!!parameters, .ns = "FreesearchR")
|
||||
attr(data, "code") <- code
|
||||
observeEvent(input$sort_levels, {
|
||||
if (input$sort_levels %% 2 == 1) {
|
||||
decreasing <- FALSE
|
||||
label <- tagList(
|
||||
phosphoricons::ph("sort-descending"),
|
||||
i18n$t("Sort by Levels")
|
||||
)
|
||||
} else {
|
||||
decreasing <- TRUE
|
||||
label <- tagList(
|
||||
phosphoricons::ph("sort-ascending"),
|
||||
i18n$t("Sort by Levels")
|
||||
)
|
||||
}
|
||||
updateActionButton(inputId = "sort_levels", label = label)
|
||||
rv$data_grid <- rv$data_grid[order(rv$data_grid[[1]], decreasing = decreasing), ]
|
||||
})
|
||||
|
||||
data
|
||||
})
|
||||
observeEvent(input$sort_occurrences, {
|
||||
if (input$sort_occurrences %% 2 == 1) {
|
||||
decreasing <- FALSE
|
||||
label <- tagList(
|
||||
phosphoricons::ph("sort-descending"),
|
||||
i18n$t("Sort by count")
|
||||
)
|
||||
} else {
|
||||
decreasing <- TRUE
|
||||
label <- tagList(
|
||||
phosphoricons::ph("sort-ascending"),
|
||||
i18n$t("Sort by count")
|
||||
)
|
||||
}
|
||||
updateActionButton(inputId = "sort_occurrences", label = label)
|
||||
rv$data_grid <- rv$data_grid[order(rv$data_grid[[2]], decreasing = decreasing), ]
|
||||
})
|
||||
|
||||
data_returned_r <- observeEvent(input$create, {
|
||||
rv$data <- data_updated_r()
|
||||
})
|
||||
return(reactive(rv$data))
|
||||
})
|
||||
|
||||
output$grid <- renderDatagrid({
|
||||
req(rv$data_grid)
|
||||
gridTheme <- getOption("datagrid.theme")
|
||||
if (length(gridTheme) < 1) {
|
||||
datamods:::apply_grid_theme()
|
||||
}
|
||||
on.exit(toastui::reset_grid_theme())
|
||||
data <- rv$data_grid
|
||||
data <- add_var_toset(data, "Var1", "New label")
|
||||
|
||||
grid <- datagrid(
|
||||
data = data,
|
||||
draggable = TRUE,
|
||||
sortable = FALSE,
|
||||
data_as_input = TRUE
|
||||
)
|
||||
grid <- grid_columns(
|
||||
grid,
|
||||
columns = c("Var1", "Var1_toset", "Freq"),
|
||||
header = c(i18n$t("Levels"), "New label", i18n$t("Count"))
|
||||
)
|
||||
grid <- grid_colorbar(
|
||||
grid,
|
||||
column = "Freq",
|
||||
label_outside = TRUE,
|
||||
label_width = "30px",
|
||||
background = "#D8DEE9",
|
||||
bar_bg = datamods:::get_primary_color(),
|
||||
from = c(0, max(rv$data_grid$Freq) + 1)
|
||||
)
|
||||
grid <- toastui::grid_style_column(
|
||||
grid = grid,
|
||||
column = "Var1_toset",
|
||||
fontStyle = "italic"
|
||||
)
|
||||
grid <- toastui::grid_editor(
|
||||
grid = grid,
|
||||
column = "Var1_toset",
|
||||
type = "text"
|
||||
)
|
||||
grid
|
||||
})
|
||||
|
||||
data_updated_r <- reactive({
|
||||
data <- req(data_r())
|
||||
variable <- req(input$variable)
|
||||
grid <- req(input$grid_data)
|
||||
|
||||
parameters <- list(
|
||||
variable = variable,
|
||||
new_variable = isTRUE(input$new_var) | any(grid[["Var1_toset"]] == "New label"),
|
||||
new_levels = as.character(grid[["Var1"]]),
|
||||
new_labels = as.character(grid[["Var1_toset"]]),
|
||||
ignore = "New label"
|
||||
)
|
||||
|
||||
data <- tryCatch(
|
||||
{
|
||||
rlang::exec(
|
||||
factor_new_levels_labels,
|
||||
!!!modifyList(parameters,
|
||||
val = list(data = data)
|
||||
)
|
||||
)
|
||||
},
|
||||
error = function(err) {
|
||||
showNotification(paste("We encountered the following error creating the new factor:", err), type = "err")
|
||||
}
|
||||
)
|
||||
|
||||
# browser()
|
||||
code <- rlang::call2(
|
||||
"factor_new_levels_labels",
|
||||
!!!parameters,
|
||||
.ns = "FreesearchR"
|
||||
)
|
||||
attr(data, "code") <- code
|
||||
|
||||
data
|
||||
})
|
||||
|
||||
data_returned_r <- observeEvent(input$create, {
|
||||
rv$data <- data_updated_r()
|
||||
})
|
||||
return(reactive(rv$data))
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
#' Simple function to apply new levels and/or labels to factor
|
||||
|
|
@ -246,12 +261,13 @@ update_factor_server <- function(id, data_r = reactive(NULL)) {
|
|||
#' data_n <- mtcars
|
||||
#' data_n$cyl <- factor(data_n$cyl)
|
||||
#' factor_new_levels_labels(data_n, "cyl", new_labels = c("four", "New label", "New label"))
|
||||
factor_new_levels_labels <- function(data,
|
||||
variable,
|
||||
new_variable = TRUE,
|
||||
new_levels = NULL,
|
||||
new_labels = NULL,
|
||||
ignore = "New label") {
|
||||
factor_new_levels_labels <- function(
|
||||
data,
|
||||
variable,
|
||||
new_variable = TRUE,
|
||||
new_levels = NULL,
|
||||
new_labels = NULL,
|
||||
ignore = "New label") {
|
||||
if (!is.factor(data[[variable]])) {
|
||||
return(data)
|
||||
}
|
||||
|
|
@ -264,19 +280,21 @@ factor_new_levels_labels <- function(data,
|
|||
new_labels <- labels(data[[variable]])
|
||||
}
|
||||
|
||||
with_level <- factor(as.character(data[[variable]]), levels = new_levels)
|
||||
with_label <- factor(with_level,
|
||||
labels = ifelse(new_labels == "New label", new_levels, new_labels))
|
||||
with_level <- factor(
|
||||
as.character(data[[variable]]),
|
||||
levels = new_levels
|
||||
)
|
||||
with_label <- factor(
|
||||
with_level,
|
||||
labels = ifelse(new_labels == "New label", new_levels, new_labels)
|
||||
)
|
||||
|
||||
|
||||
if (isTRUE(new_variable)) {
|
||||
append_column(
|
||||
data = data,
|
||||
column = with_label,
|
||||
name = unique_names(
|
||||
new = paste0(variable, "_updated"),
|
||||
existing = names(data)
|
||||
)
|
||||
name = unique_names(new = paste0(variable, "_updated"), existing = names(data))
|
||||
)
|
||||
} else {
|
||||
data[[variable]] <- with_label
|
||||
|
|
@ -285,6 +303,7 @@ factor_new_levels_labels <- function(data,
|
|||
}
|
||||
|
||||
|
||||
|
||||
#' @inheritParams shiny::modalDialog
|
||||
#' @export
|
||||
#'
|
||||
|
|
@ -298,23 +317,17 @@ modal_update_factor <- function(id,
|
|||
size = "l",
|
||||
footer = NULL) {
|
||||
ns <- NS(id)
|
||||
showModal(
|
||||
modalDialog(
|
||||
title = tagList(title, datamods:::button_close_modal()),
|
||||
update_factor_ui(id),
|
||||
tags$div(
|
||||
style = "display: none;",
|
||||
textInput(
|
||||
inputId = ns("hidden"),
|
||||
label = NULL,
|
||||
value = datamods:::genId()
|
||||
)
|
||||
),
|
||||
easyClose = easyClose,
|
||||
size = size,
|
||||
footer = footer
|
||||
)
|
||||
)
|
||||
showModal(modalDialog(
|
||||
title = tagList(title, datamods:::button_close_modal()),
|
||||
update_factor_ui(id),
|
||||
tags$div(
|
||||
style = "display: none;",
|
||||
textInput(inputId = ns("hidden"), label = NULL, value = datamods:::genId())
|
||||
),
|
||||
easyClose = easyClose,
|
||||
size = size,
|
||||
footer = footer
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -333,11 +346,10 @@ winbox_update_factor <- function(id,
|
|||
title = title,
|
||||
ui = tagList(
|
||||
update_factor_ui(id),
|
||||
tags$div(style = "display: none;", textInput(
|
||||
inputId = ns("hidden"),
|
||||
label = NULL,
|
||||
value = genId()
|
||||
))
|
||||
tags$div(
|
||||
style = "display: none;",
|
||||
textInput(inputId = ns("hidden"), label = NULL, value = genId())
|
||||
)
|
||||
),
|
||||
options = modifyList(
|
||||
shinyWidgets::wbOptions(height = "615px", modal = TRUE),
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ visual_summary <- function(data, legend.title = NULL, ylab = "Observations", ...
|
|||
ggplot2::theme_minimal() +
|
||||
ggplot2::theme(axis.text.x = ggplot2::element_text(
|
||||
angle = 45,
|
||||
vjust = 0, hjust = 1
|
||||
vjust = 1, hjust = 1
|
||||
)) +
|
||||
ggplot2::scale_fill_manual(values = l$colors) +
|
||||
ggplot2::labs(x = "", y = ylab) +
|
||||
|
|
|
|||
444
SESSION.md
444
SESSION.md
|
|
@ -1,21 +1,21 @@
|
|||
--------------------------------------------------------------------------------
|
||||
-------------------------------- R environment ---------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
|setting |value |
|
||||
|:-----------|:------------------------------------------|
|
||||
|version |R version 4.5.2 (2025-10-31) |
|
||||
|os |macOS Tahoe 26.3 |
|
||||
|system |aarch64, darwin20 |
|
||||
|ui |RStudio |
|
||||
|language |(EN) |
|
||||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|date |2026-02-23 |
|
||||
|rstudio |2026.01.1+403 Apple Blossom (desktop) |
|
||||
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|
||||
|quarto |1.7.30 @ /usr/local/bin/quarto |
|
||||
|FreesearchR |26.2.2.260223 |
|
||||
|setting |value |
|
||||
|:-----------|:----------------------------------------------|
|
||||
|version |R version 4.4.1 (2024-06-14) |
|
||||
|os |macOS 26.1 |
|
||||
|system |aarch64, darwin20 |
|
||||
|ui |RStudio |
|
||||
|language |(EN) |
|
||||
|collate |en_US.UTF-8 |
|
||||
|ctype |en_US.UTF-8 |
|
||||
|tz |Europe/Copenhagen |
|
||||
|date |2026-01-06 |
|
||||
|rstudio |2025.09.2+418 Cucumberleaf Sunflower (desktop) |
|
||||
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|
||||
|quarto |1.7.30 @ /usr/local/bin/quarto |
|
||||
|FreesearchR |26.1.1.260106 |
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
@ -23,216 +23,204 @@
|
|||
--------------------------------------------------------------------------------
|
||||
|package |loadedversion |date |source |
|
||||
|:-----------------|:-------------|:----------|:--------------|
|
||||
|apexcharter |0.4.5 |2026-01-07 |CRAN (R 4.5.2) |
|
||||
|askpass |1.2.1 |2024-10-04 |CRAN (R 4.5.0) |
|
||||
|assertthat |0.2.1 |2019-03-21 |CRAN (R 4.5.0) |
|
||||
|attachment |0.4.5 |2025-03-14 |CRAN (R 4.5.0) |
|
||||
|attempt |0.3.1 |2020-05-03 |CRAN (R 4.5.0) |
|
||||
|backports |1.5.0 |2024-05-23 |CRAN (R 4.5.0) |
|
||||
|base64enc |0.1-6 |2026-02-02 |CRAN (R 4.5.2) |
|
||||
|bayestestR |0.17.0 |2025-08-29 |CRAN (R 4.5.0) |
|
||||
|bit |4.6.0 |2025-03-06 |CRAN (R 4.5.0) |
|
||||
|bit64 |4.6.0-1 |2025-01-16 |CRAN (R 4.5.0) |
|
||||
|bitops |1.0-9 |2024-10-03 |CRAN (R 4.5.0) |
|
||||
|boot |1.3-32 |2025-08-29 |CRAN (R 4.5.2) |
|
||||
|brio |1.1.5 |2024-04-24 |CRAN (R 4.5.0) |
|
||||
|broom |1.0.12 |2026-01-27 |CRAN (R 4.5.2) |
|
||||
|broom.helpers |1.22.0 |2025-09-17 |CRAN (R 4.5.0) |
|
||||
|bsicons |0.1.2 |2023-11-04 |CRAN (R 4.5.0) |
|
||||
|bslib |0.10.0 |2026-01-26 |CRAN (R 4.5.2) |
|
||||
|cachem |1.1.0 |2024-05-16 |CRAN (R 4.5.0) |
|
||||
|calendar |0.2.0 |2024-08-20 |CRAN (R 4.5.0) |
|
||||
|cards |0.7.1 |2025-12-02 |CRAN (R 4.5.2) |
|
||||
|cardx |0.3.2 |2026-02-05 |CRAN (R 4.5.2) |
|
||||
|caTools |1.18.3 |2024-09-04 |CRAN (R 4.5.0) |
|
||||
|cellranger |1.1.0 |2016-07-27 |CRAN (R 4.5.0) |
|
||||
|cffr |1.2.1 |2026-01-12 |CRAN (R 4.5.2) |
|
||||
|checkmate |2.3.4 |2026-02-03 |CRAN (R 4.5.2) |
|
||||
|class |7.3-23 |2025-01-01 |CRAN (R 4.5.2) |
|
||||
|classInt |0.4-11 |2025-01-08 |CRAN (R 4.5.0) |
|
||||
|cli |3.6.5 |2025-04-23 |CRAN (R 4.5.0) |
|
||||
|cluster |2.1.8.2 |2026-02-05 |CRAN (R 4.5.2) |
|
||||
|codetools |0.2-20 |2024-03-31 |CRAN (R 4.5.2) |
|
||||
|colorspace |2.1-2 |2025-09-22 |CRAN (R 4.5.0) |
|
||||
|commonmark |2.0.0 |2025-07-07 |CRAN (R 4.5.0) |
|
||||
|crayon |1.5.3 |2024-06-20 |CRAN (R 4.5.0) |
|
||||
|curl |7.0.0 |2025-08-19 |CRAN (R 4.5.0) |
|
||||
|data.table |1.18.2.1 |2026-01-27 |CRAN (R 4.5.2) |
|
||||
|datamods |1.5.3 |2024-10-02 |CRAN (R 4.5.0) |
|
||||
|datawizard |1.3.0 |2025-10-11 |CRAN (R 4.5.0) |
|
||||
|DEoptimR |1.1-4 |2025-07-27 |CRAN (R 4.5.0) |
|
||||
|desc |1.4.3 |2023-12-10 |CRAN (R 4.5.0) |
|
||||
|devtools |2.4.6 |2025-10-03 |CRAN (R 4.5.0) |
|
||||
|DHARMa |0.4.7 |2024-10-18 |CRAN (R 4.5.0) |
|
||||
|digest |0.6.39 |2025-11-19 |CRAN (R 4.5.2) |
|
||||
|dockerfiler |0.2.5 |2025-05-07 |CRAN (R 4.5.0) |
|
||||
|doParallel |1.0.17 |2022-02-07 |CRAN (R 4.5.0) |
|
||||
|dplyr |1.2.0 |2026-02-03 |CRAN (R 4.5.2) |
|
||||
|DT |0.34.0 |2025-09-02 |CRAN (R 4.5.0) |
|
||||
|e1071 |1.7-17 |2025-12-18 |CRAN (R 4.5.2) |
|
||||
|easystats |0.7.5 |2025-07-11 |CRAN (R 4.5.0) |
|
||||
|ellipsis |0.3.2 |2021-04-29 |CRAN (R 4.5.0) |
|
||||
|emmeans |2.0.1 |2025-12-16 |CRAN (R 4.5.2) |
|
||||
|esquisse |2.1.0 |2025-02-21 |CRAN (R 4.5.0) |
|
||||
|estimability |1.5.1 |2024-05-12 |CRAN (R 4.5.0) |
|
||||
|eulerr |7.0.4 |2025-09-24 |CRAN (R 4.5.0) |
|
||||
|evaluate |1.0.5 |2025-08-27 |CRAN (R 4.5.0) |
|
||||
|farver |2.1.2 |2024-05-13 |CRAN (R 4.5.0) |
|
||||
|fastmap |1.2.0 |2024-05-15 |CRAN (R 4.5.0) |
|
||||
|flextable |0.9.11 |2026-02-13 |CRAN (R 4.5.2) |
|
||||
|fontawesome |0.5.3 |2024-11-16 |CRAN (R 4.5.0) |
|
||||
|fontBitstreamVera |0.1.1 |2017-02-01 |CRAN (R 4.5.0) |
|
||||
|fontLiberation |0.1.0 |2016-10-15 |CRAN (R 4.5.0) |
|
||||
|fontquiver |0.2.1 |2017-02-01 |CRAN (R 4.5.0) |
|
||||
|forcats |1.0.1 |2025-09-25 |CRAN (R 4.5.0) |
|
||||
|foreach |1.5.2 |2022-02-02 |CRAN (R 4.5.0) |
|
||||
|foreign |0.8-90 |2025-03-31 |CRAN (R 4.5.2) |
|
||||
|Formula |1.2-5 |2023-02-24 |CRAN (R 4.5.0) |
|
||||
|FreesearchR |26.2.2 |NA |NA |
|
||||
|fs |1.6.6 |2025-04-12 |CRAN (R 4.5.0) |
|
||||
|gdtools |0.5.0 |2026-02-09 |CRAN (R 4.5.2) |
|
||||
|generics |0.1.4 |2025-05-09 |CRAN (R 4.5.0) |
|
||||
|ggalluvial |0.12.5 |2023-02-22 |CRAN (R 4.5.0) |
|
||||
|ggcorrplot |0.1.4.1 |2023-09-05 |CRAN (R 4.5.0) |
|
||||
|ggforce |0.5.0 |2025-06-18 |CRAN (R 4.5.0) |
|
||||
|ggplot2 |4.0.2 |2026-02-03 |CRAN (R 4.5.2) |
|
||||
|ggridges |0.5.7 |2025-08-27 |CRAN (R 4.5.0) |
|
||||
|ggstats |0.12.0 |2025-12-22 |CRAN (R 4.5.2) |
|
||||
|glue |1.8.0 |2024-09-30 |CRAN (R 4.5.0) |
|
||||
|gridExtra |2.3 |2017-09-09 |CRAN (R 4.5.0) |
|
||||
|gt |1.3.0 |2026-01-22 |CRAN (R 4.5.2) |
|
||||
|gtable |0.3.6 |2024-10-25 |CRAN (R 4.5.0) |
|
||||
|gtsummary |2.5.0 |2025-12-05 |CRAN (R 4.5.2) |
|
||||
|haven |2.5.5 |2025-05-30 |CRAN (R 4.5.0) |
|
||||
|here |1.0.2 |2025-09-15 |CRAN (R 4.5.0) |
|
||||
|Hmisc |5.2-5 |2026-01-09 |CRAN (R 4.5.2) |
|
||||
|hms |1.1.4 |2025-10-17 |CRAN (R 4.5.0) |
|
||||
|htmlTable |2.4.3 |2024-07-21 |CRAN (R 4.5.0) |
|
||||
|htmltools |0.5.9 |2025-12-04 |CRAN (R 4.5.2) |
|
||||
|htmlwidgets |1.6.4 |2023-12-06 |CRAN (R 4.5.0) |
|
||||
|httpuv |1.6.16 |2025-04-16 |CRAN (R 4.5.0) |
|
||||
|IDEAFilter |0.2.1 |2025-07-29 |CRAN (R 4.5.0) |
|
||||
|insight |1.4.6 |2026-02-04 |CRAN (R 4.5.2) |
|
||||
|iterators |1.0.14 |2022-02-05 |CRAN (R 4.5.0) |
|
||||
|jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.5.0) |
|
||||
|jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.5.0) |
|
||||
|jsonvalidate |1.5.0 |2025-02-07 |CRAN (R 4.5.0) |
|
||||
|KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.5.2) |
|
||||
|keyring |1.4.1 |2025-06-15 |CRAN (R 4.5.0) |
|
||||
|knitr |1.51 |2025-12-20 |CRAN (R 4.5.2) |
|
||||
|later |1.4.6 |2026-02-13 |CRAN (R 4.5.2) |
|
||||
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.5.2) |
|
||||
|lifecycle |1.0.5 |2026-01-08 |CRAN (R 4.5.2) |
|
||||
|litedown |0.9 |2025-12-18 |CRAN (R 4.5.2) |
|
||||
|lme4 |1.1-38 |2025-12-02 |CRAN (R 4.5.2) |
|
||||
|lubridate |1.9.5 |2026-02-04 |CRAN (R 4.5.2) |
|
||||
|magrittr |2.0.4 |2025-09-12 |CRAN (R 4.5.0) |
|
||||
|markdown |2.0 |2025-03-23 |CRAN (R 4.5.0) |
|
||||
|MASS |7.3-65 |2025-02-28 |CRAN (R 4.5.0) |
|
||||
|Matrix |1.7-4 |2025-08-28 |CRAN (R 4.5.2) |
|
||||
|memoise |2.0.1 |2021-11-26 |CRAN (R 4.5.0) |
|
||||
|mime |0.13 |2025-03-17 |CRAN (R 4.5.0) |
|
||||
|minqa |1.2.8 |2024-08-17 |CRAN (R 4.5.0) |
|
||||
|mvtnorm |1.3-3 |2025-01-10 |CRAN (R 4.5.0) |
|
||||
|NHANES |2.1.0 |2015-07-02 |CRAN (R 4.5.0) |
|
||||
|nlme |3.1-168 |2025-03-31 |CRAN (R 4.5.2) |
|
||||
|nloptr |2.2.1 |2025-03-17 |CRAN (R 4.5.0) |
|
||||
|nnet |7.3-20 |2025-01-01 |CRAN (R 4.5.2) |
|
||||
|officer |0.7.3 |2026-01-16 |CRAN (R 4.5.2) |
|
||||
|opdisDownsampling |1.0.1 |2024-04-15 |CRAN (R 4.5.0) |
|
||||
|openssl |2.3.4 |2025-09-30 |CRAN (R 4.5.0) |
|
||||
|openxlsx2 |1.23.1 |2026-01-19 |CRAN (R 4.5.2) |
|
||||
|otel |0.2.0 |2025-08-29 |CRAN (R 4.5.0) |
|
||||
|pak |0.9.2 |2025-12-22 |CRAN (R 4.5.2) |
|
||||
|parameters |0.28.3 |2025-11-25 |CRAN (R 4.5.2) |
|
||||
|patchwork |1.3.2 |2025-08-25 |CRAN (R 4.5.0) |
|
||||
|pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.5.0) |
|
||||
|performance |0.16.0 |2026-02-04 |CRAN (R 4.5.2) |
|
||||
|phosphoricons |0.2.1 |2024-04-08 |CRAN (R 4.5.0) |
|
||||
|pillar |1.11.1 |2025-09-17 |CRAN (R 4.5.0) |
|
||||
|pkgbuild |1.4.8 |2025-05-26 |CRAN (R 4.5.0) |
|
||||
|pkgconfig |2.0.3 |2019-09-22 |CRAN (R 4.5.0) |
|
||||
|pkgload |1.5.0 |2026-02-03 |CRAN (R 4.5.2) |
|
||||
|plyr |1.8.9 |2023-10-02 |CRAN (R 4.5.0) |
|
||||
|polyclip |1.10-7 |2024-07-23 |CRAN (R 4.5.0) |
|
||||
|pracma |2.4.6 |2025-10-22 |CRAN (R 4.5.0) |
|
||||
|processx |3.8.6 |2025-02-21 |CRAN (R 4.5.0) |
|
||||
|promises |1.5.0 |2025-11-01 |CRAN (R 4.5.0) |
|
||||
|proxy |0.4-29 |2025-12-29 |CRAN (R 4.5.2) |
|
||||
|ps |1.9.1 |2025-04-12 |CRAN (R 4.5.0) |
|
||||
|purrr |1.2.1 |2026-01-09 |CRAN (R 4.5.2) |
|
||||
|qqconf |1.3.2 |2023-04-14 |CRAN (R 4.5.0) |
|
||||
|qqplotr |0.0.7 |2025-09-05 |CRAN (R 4.5.0) |
|
||||
|quarto |1.5.1 |2025-09-04 |CRAN (R 4.5.0) |
|
||||
|R6 |2.6.1 |2025-02-15 |CRAN (R 4.5.0) |
|
||||
|ragg |1.5.0 |2025-09-02 |CRAN (R 4.5.0) |
|
||||
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.5.0) |
|
||||
|rappdirs |0.3.4 |2026-01-17 |CRAN (R 4.5.2) |
|
||||
|rbibutils |2.4.1 |2026-01-21 |CRAN (R 4.5.2) |
|
||||
|RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.5.0) |
|
||||
|Rcpp |1.1.1 |2026-01-10 |CRAN (R 4.5.2) |
|
||||
|RcppArmadillo |15.2.3-1 |2025-12-17 |CRAN (R 4.5.2) |
|
||||
|Rdpack |2.6.6 |2026-02-08 |CRAN (R 4.5.2) |
|
||||
|reactable |0.4.5 |2025-12-01 |CRAN (R 4.5.2) |
|
||||
|readODS |2.3.2 |2025-01-13 |CRAN (R 4.5.0) |
|
||||
|readr |2.2.0 |2026-02-19 |CRAN (R 4.5.2) |
|
||||
|readxl |1.4.5 |2025-03-07 |CRAN (R 4.5.0) |
|
||||
|REDCapCAST |26.1.1 |2026-01-29 |CRAN (R 4.5.2) |
|
||||
|REDCapR |1.6.0 |2025-10-08 |CRAN (R 4.5.0) |
|
||||
|reformulas |0.4.4 |2026-02-02 |CRAN (R 4.5.2) |
|
||||
|remotes |2.5.0 |2024-03-17 |CRAN (R 4.5.0) |
|
||||
|rempsyc |0.2.0 |2025-09-15 |CRAN (R 4.5.0) |
|
||||
|renv |1.1.7 |2026-01-27 |CRAN (R 4.5.2) |
|
||||
|reshape2 |1.4.5 |2025-11-12 |CRAN (R 4.5.0) |
|
||||
|rio |1.2.4 |2025-09-26 |CRAN (R 4.5.0) |
|
||||
|rlang |1.1.7 |2026-01-09 |CRAN (R 4.5.2) |
|
||||
|rmarkdown |2.30 |2025-09-28 |CRAN (R 4.5.0) |
|
||||
|robustbase |0.99-7 |2026-02-05 |CRAN (R 4.5.2) |
|
||||
|roxygen2 |7.3.3 |2025-09-03 |CRAN (R 4.5.0) |
|
||||
|rpart |4.1.24 |2025-01-07 |CRAN (R 4.5.2) |
|
||||
|rprojroot |2.1.1 |2025-08-26 |CRAN (R 4.5.0) |
|
||||
|rsconnect |1.7.0 |2025-12-06 |CRAN (R 4.5.2) |
|
||||
|rstudioapi |0.18.0 |2026-01-16 |CRAN (R 4.5.2) |
|
||||
|S7 |0.2.1 |2025-11-14 |CRAN (R 4.5.2) |
|
||||
|sass |0.4.10 |2025-04-11 |CRAN (R 4.5.0) |
|
||||
|scales |1.4.0 |2025-04-24 |CRAN (R 4.5.0) |
|
||||
|see |0.13.0 |2026-01-30 |CRAN (R 4.5.2) |
|
||||
|sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.5.0) |
|
||||
|shiny |1.13.0 |2026-02-20 |CRAN (R 4.5.2) |
|
||||
|shiny.i18n |0.3.0 |2023-01-16 |CRAN (R 4.5.0) |
|
||||
|shiny2docker |0.0.3 |2025-06-28 |CRAN (R 4.5.0) |
|
||||
|shinybusy |0.3.3 |2024-03-09 |CRAN (R 4.5.0) |
|
||||
|shinyjs |2.1.1 |2026-01-15 |CRAN (R 4.5.2) |
|
||||
|shinyTime |1.0.3 |2022-08-19 |CRAN (R 4.5.0) |
|
||||
|shinyWidgets |0.9.0 |2025-02-21 |CRAN (R 4.5.0) |
|
||||
|smd |0.8.0 |2025-02-12 |CRAN (R 4.5.0) |
|
||||
|stringi |1.8.7 |2025-03-27 |CRAN (R 4.5.0) |
|
||||
|stringr |1.6.0 |2025-11-04 |CRAN (R 4.5.0) |
|
||||
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.5.0) |
|
||||
|systemfonts |1.3.1 |2025-10-01 |CRAN (R 4.5.0) |
|
||||
|testthat |3.3.2 |2026-01-11 |CRAN (R 4.5.2) |
|
||||
|textshaping |1.0.4 |2025-10-10 |CRAN (R 4.5.0) |
|
||||
|thematic |0.1.8 |2025-09-29 |CRAN (R 4.5.0) |
|
||||
|tibble |3.3.1 |2026-01-11 |CRAN (R 4.5.2) |
|
||||
|tidyr |1.3.2 |2025-12-19 |CRAN (R 4.5.2) |
|
||||
|tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.5.0) |
|
||||
|timechange |0.4.0 |2026-01-29 |CRAN (R 4.5.2) |
|
||||
|toastui |0.4.0 |2025-04-03 |CRAN (R 4.5.0) |
|
||||
|tweenr |2.0.3 |2024-02-26 |CRAN (R 4.5.0) |
|
||||
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.5.0) |
|
||||
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.5.0) |
|
||||
|usethis |3.2.1 |2025-09-06 |CRAN (R 4.5.0) |
|
||||
|uuid |1.2-2 |2026-01-23 |CRAN (R 4.5.2) |
|
||||
|V8 |8.0.1 |2025-10-10 |CRAN (R 4.5.0) |
|
||||
|vctrs |0.7.1 |2026-01-23 |CRAN (R 4.5.2) |
|
||||
|viridis |0.6.5 |2024-01-29 |CRAN (R 4.5.0) |
|
||||
|viridisLite |0.4.3 |2026-02-04 |CRAN (R 4.5.2) |
|
||||
|vroom |1.7.0 |2026-01-27 |CRAN (R 4.5.2) |
|
||||
|withr |3.0.2 |2024-10-28 |CRAN (R 4.5.0) |
|
||||
|writexl |1.5.4 |2025-04-15 |CRAN (R 4.5.0) |
|
||||
|xfun |0.56 |2026-01-18 |CRAN (R 4.5.2) |
|
||||
|xml2 |1.5.2 |2026-01-17 |CRAN (R 4.5.2) |
|
||||
|xtable |1.8-4 |2019-04-21 |CRAN (R 4.5.0) |
|
||||
|yaml |2.3.12 |2025-12-10 |CRAN (R 4.5.2) |
|
||||
|yesno |0.1.3 |2024-07-26 |CRAN (R 4.5.0) |
|
||||
|zip |2.3.3 |2025-05-13 |CRAN (R 4.5.0) |
|
||||
|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) |
|
||||
|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.17.0 |2025-08-29 |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-32 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|brio |1.1.5 |2024-04-24 |CRAN (R 4.4.1) |
|
||||
|broom |1.0.11 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|broom.helpers |1.22.0 |2025-09-17 |CRAN (R 4.4.1) |
|
||||
|bsicons |0.1.2 |2023-11-04 |CRAN (R 4.4.0) |
|
||||
|bslib |0.9.0 |2025-01-30 |CRAN (R 4.4.1) |
|
||||
|cachem |1.1.0 |2024-05-16 |CRAN (R 4.4.1) |
|
||||
|calendar |0.2.0 |2024-08-20 |CRAN (R 4.4.1) |
|
||||
|cards |0.7.1 |2025-12-02 |CRAN (R 4.4.3) |
|
||||
|cardx |0.3.1 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|caTools |1.18.3 |2024-09-04 |CRAN (R 4.4.1) |
|
||||
|cellranger |1.1.0 |2016-07-27 |CRAN (R 4.4.0) |
|
||||
|checkmate |2.3.3 |2025-08-18 |CRAN (R 4.4.1) |
|
||||
|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) |
|
||||
|cluster |2.1.8.1 |2025-03-12 |CRAN (R 4.4.1) |
|
||||
|codetools |0.2-20 |2024-03-31 |CRAN (R 4.4.1) |
|
||||
|colorspace |2.1-2 |2025-09-22 |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) |
|
||||
|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.3.0 |2025-10-11 |CRAN (R 4.4.1) |
|
||||
|DEoptimR |1.1-4 |2025-07-27 |CRAN (R 4.4.1) |
|
||||
|desc |1.4.3 |2023-12-10 |CRAN (R 4.4.1) |
|
||||
|devtools |2.4.6 |2025-10-03 |CRAN (R 4.4.1) |
|
||||
|DHARMa |0.4.7 |2024-10-18 |CRAN (R 4.4.1) |
|
||||
|digest |0.6.39 |2025-11-19 |CRAN (R 4.4.3) |
|
||||
|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.34.0 |2025-09-02 |CRAN (R 4.4.1) |
|
||||
|e1071 |1.7-16 |2024-09-16 |CRAN (R 4.4.1) |
|
||||
|easystats |0.7.5 |2025-07-11 |CRAN (R 4.4.1) |
|
||||
|ellipsis |0.3.2 |2021-04-29 |CRAN (R 4.4.1) |
|
||||
|emmeans |2.0.0 |2025-10-29 |CRAN (R 4.4.1) |
|
||||
|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.4 |2025-09-24 |CRAN (R 4.4.1) |
|
||||
|evaluate |1.0.5 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|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.10 |2025-08-24 |CRAN (R 4.4.1) |
|
||||
|fontawesome |0.5.3 |2024-11-16 |CRAN (R 4.4.1) |
|
||||
|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.1 |2025-09-25 |CRAN (R 4.4.1) |
|
||||
|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 |26.1.1 |NA |NA |
|
||||
|fs |1.6.6 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|gdtools |0.4.4 |2025-10-06 |CRAN (R 4.4.1) |
|
||||
|generics |0.1.4 |2025-05-09 |CRAN (R 4.4.1) |
|
||||
|ggalluvial |0.12.5 |2023-02-22 |CRAN (R 4.4.0) |
|
||||
|ggcorrplot |0.1.4.1 |2023-09-05 |CRAN (R 4.4.0) |
|
||||
|ggforce |0.5.0 |2025-06-18 |CRAN (R 4.4.1) |
|
||||
|ggplot2 |4.0.1 |2025-11-14 |CRAN (R 4.4.1) |
|
||||
|ggridges |0.5.7 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|ggstats |0.11.0 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|glue |1.8.0 |2024-09-30 |CRAN (R 4.4.1) |
|
||||
|gridExtra |2.3 |2017-09-09 |CRAN (R 4.4.1) |
|
||||
|gt |1.1.0 |2025-09-23 |CRAN (R 4.4.1) |
|
||||
|gtable |0.3.6 |2024-10-25 |CRAN (R 4.4.1) |
|
||||
|gtsummary |2.5.0 |2025-12-05 |CRAN (R 4.4.3) |
|
||||
|haven |2.5.5 |2025-05-30 |CRAN (R 4.4.1) |
|
||||
|here |1.0.2 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|Hmisc |5.2-4 |2025-10-05 |CRAN (R 4.4.1) |
|
||||
|hms |1.1.4 |2025-10-17 |CRAN (R 4.4.1) |
|
||||
|htmlTable |2.4.3 |2024-07-21 |CRAN (R 4.4.0) |
|
||||
|htmltools |0.5.9 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|htmlwidgets |1.6.4 |2023-12-06 |CRAN (R 4.4.0) |
|
||||
|httpuv |1.6.16 |2025-04-16 |CRAN (R 4.4.1) |
|
||||
|IDEAFilter |0.2.1 |2025-07-29 |CRAN (R 4.4.1) |
|
||||
|insight |1.4.4 |2025-12-06 |CRAN (R 4.4.3) |
|
||||
|iterators |1.0.14 |2022-02-05 |CRAN (R 4.4.1) |
|
||||
|jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.4.0) |
|
||||
|jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|keyring |1.4.1 |2025-06-15 |CRAN (R 4.4.1) |
|
||||
|knitr |1.50 |2025-03-16 |CRAN (R 4.4.1) |
|
||||
|later |1.4.4 |2025-08-27 |CRAN (R 4.4.1) |
|
||||
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.4.1) |
|
||||
|lifecycle |1.0.4 |2023-11-07 |CRAN (R 4.4.1) |
|
||||
|lme4 |1.1-38 |2025-12-02 |CRAN (R 4.4.3) |
|
||||
|lubridate |1.9.4 |2024-12-08 |CRAN (R 4.4.1) |
|
||||
|magrittr |2.0.4 |2025-09-12 |CRAN (R 4.4.1) |
|
||||
|MASS |7.3-65 |2025-02-28 |CRAN (R 4.4.1) |
|
||||
|Matrix |1.7-4 |2025-08-28 |CRAN (R 4.4.1) |
|
||||
|memoise |2.0.1 |2021-11-26 |CRAN (R 4.4.0) |
|
||||
|mime |0.13 |2025-03-17 |CRAN (R 4.4.1) |
|
||||
|minqa |1.2.8 |2024-08-17 |CRAN (R 4.4.1) |
|
||||
|mvtnorm |1.3-3 |2025-01-10 |CRAN (R 4.4.1) |
|
||||
|NHANES |2.1.0 |2015-07-02 |CRAN (R 4.4.0) |
|
||||
|nlme |3.1-168 |2025-03-31 |CRAN (R 4.4.1) |
|
||||
|nloptr |2.2.1 |2025-03-17 |CRAN (R 4.4.1) |
|
||||
|nnet |7.3-20 |2025-01-01 |CRAN (R 4.4.1) |
|
||||
|officer |0.7.2 |2025-12-04 |CRAN (R 4.4.3) |
|
||||
|opdisDownsampling |1.0.1 |2024-04-15 |CRAN (R 4.4.0) |
|
||||
|openssl |2.3.4 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|openxlsx2 |1.22 |2025-12-07 |CRAN (R 4.4.3) |
|
||||
|otel |0.2.0 |2025-08-29 |CRAN (R 4.4.1) |
|
||||
|parameters |0.28.3 |2025-11-25 |CRAN (R 4.4.3) |
|
||||
|patchwork |1.3.2 |2025-08-25 |CRAN (R 4.4.1) |
|
||||
|pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.4.1) |
|
||||
|performance |0.15.3 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|phosphoricons |0.2.1 |2024-04-08 |CRAN (R 4.4.0) |
|
||||
|pillar |1.11.1 |2025-09-17 |CRAN (R 4.4.1) |
|
||||
|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.1 |2025-09-23 |CRAN (R 4.4.1) |
|
||||
|plyr |1.8.9 |2023-10-02 |CRAN (R 4.4.1) |
|
||||
|polyclip |1.10-7 |2024-07-23 |CRAN (R 4.4.1) |
|
||||
|pracma |2.4.6 |2025-10-22 |CRAN (R 4.4.1) |
|
||||
|processx |3.8.6 |2025-02-21 |CRAN (R 4.4.1) |
|
||||
|promises |1.5.0 |2025-11-01 |CRAN (R 4.4.1) |
|
||||
|proxy |0.4-27 |2022-06-09 |CRAN (R 4.4.1) |
|
||||
|ps |1.9.1 |2025-04-12 |CRAN (R 4.4.1) |
|
||||
|purrr |1.2.0 |2025-11-04 |CRAN (R 4.4.1) |
|
||||
|qqconf |1.3.2 |2023-04-14 |CRAN (R 4.4.0) |
|
||||
|qqplotr |0.0.7 |2025-09-05 |CRAN (R 4.4.1) |
|
||||
|quarto |1.5.1 |2025-09-04 |CRAN (R 4.4.1) |
|
||||
|R6 |2.6.1 |2025-02-15 |CRAN (R 4.4.1) |
|
||||
|ragg |1.5.0 |2025-09-02 |CRAN (R 4.4.1) |
|
||||
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.4.0) |
|
||||
|rbibutils |2.4 |2025-11-07 |CRAN (R 4.4.1) |
|
||||
|RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.4.1) |
|
||||
|Rcpp |1.1.0 |2025-07-02 |CRAN (R 4.4.1) |
|
||||
|RcppArmadillo |15.2.2-1 |2025-11-22 |CRAN (R 4.4.3) |
|
||||
|Rdpack |2.6.4 |2025-04-09 |CRAN (R 4.4.1) |
|
||||
|reactable |0.4.5 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|readODS |2.3.2 |2025-01-13 |CRAN (R 4.4.1) |
|
||||
|readr |2.1.6 |2025-11-14 |CRAN (R 4.4.3) |
|
||||
|readxl |1.4.5 |2025-03-07 |CRAN (R 4.4.1) |
|
||||
|REDCapCAST |25.3.2 |2025-03-10 |CRAN (R 4.4.1) |
|
||||
|REDCapR |1.6.0 |2025-10-08 |CRAN (R 4.4.1) |
|
||||
|reformulas |0.4.2 |2025-10-28 |CRAN (R 4.4.1) |
|
||||
|remotes |2.5.0 |2024-03-17 |CRAN (R 4.4.1) |
|
||||
|rempsyc |0.2.0 |2025-09-15 |CRAN (R 4.4.1) |
|
||||
|renv |1.1.5 |2025-07-24 |CRAN (R 4.4.1) |
|
||||
|reshape2 |1.4.5 |2025-11-12 |CRAN (R 4.4.1) |
|
||||
|rio |1.2.4 |2025-09-26 |CRAN (R 4.4.1) |
|
||||
|rlang |1.1.6 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|rmarkdown |2.30 |2025-09-28 |CRAN (R 4.4.1) |
|
||||
|robustbase |0.99-6 |2025-09-04 |CRAN (R 4.4.1) |
|
||||
|roxygen2 |7.3.3 |2025-09-03 |CRAN (R 4.4.1) |
|
||||
|rpart |4.1.24 |2025-01-07 |CRAN (R 4.4.1) |
|
||||
|rprojroot |2.1.1 |2025-08-26 |CRAN (R 4.4.1) |
|
||||
|rsconnect |1.7.0 |2025-12-06 |CRAN (R 4.4.3) |
|
||||
|rstudioapi |0.17.1 |2024-10-22 |CRAN (R 4.4.1) |
|
||||
|S7 |0.2.1 |2025-11-14 |CRAN (R 4.4.3) |
|
||||
|sass |0.4.10 |2025-04-11 |CRAN (R 4.4.1) |
|
||||
|scales |1.4.0 |2025-04-24 |CRAN (R 4.4.1) |
|
||||
|see |0.12.0 |2025-09-14 |CRAN (R 4.4.1) |
|
||||
|sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.4.1) |
|
||||
|shiny |1.12.1 |2025-12-09 |CRAN (R 4.4.1) |
|
||||
|shiny.i18n |0.3.0 |2023-01-16 |CRAN (R 4.4.0) |
|
||||
|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) |
|
||||
|smd |0.8.0 |2025-02-12 |CRAN (R 4.4.1) |
|
||||
|stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) |
|
||||
|stringr |1.6.0 |2025-11-04 |CRAN (R 4.4.1) |
|
||||
|stRoke |25.9.2 |2025-09-30 |CRAN (R 4.4.1) |
|
||||
|systemfonts |1.3.1 |2025-10-01 |CRAN (R 4.4.1) |
|
||||
|testthat |3.3.1 |2025-11-25 |CRAN (R 4.4.3) |
|
||||
|textshaping |1.0.4 |2025-10-10 |CRAN (R 4.4.1) |
|
||||
|thematic |0.1.8 |2025-09-29 |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) |
|
||||
|tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.4.0) |
|
||||
|timechange |0.3.0 |2024-01-18 |CRAN (R 4.4.1) |
|
||||
|toastui |0.4.0 |2025-04-03 |CRAN (R 4.4.1) |
|
||||
|tweenr |2.0.3 |2024-02-26 |CRAN (R 4.4.0) |
|
||||
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.4.1) |
|
||||
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) |
|
||||
|usethis |3.2.1 |2025-09-06 |CRAN (R 4.4.1) |
|
||||
|utf8 |1.2.6 |2025-06-08 |CRAN (R 4.4.1) |
|
||||
|uuid |1.2-1 |2024-07-29 |CRAN (R 4.4.1) |
|
||||
|vctrs |0.6.5 |2023-12-01 |CRAN (R 4.4.0) |
|
||||
|viridis |0.6.5 |2024-01-29 |CRAN (R 4.4.0) |
|
||||
|viridisLite |0.4.2 |2023-05-02 |CRAN (R 4.4.1) |
|
||||
|vroom |1.6.7 |2025-11-28 |CRAN (R 4.4.3) |
|
||||
|withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) |
|
||||
|writexl |1.5.4 |2025-04-15 |CRAN (R 4.4.1) |
|
||||
|xfun |0.54 |2025-10-30 |CRAN (R 4.4.1) |
|
||||
|xml2 |1.5.1 |2025-12-01 |CRAN (R 4.4.3) |
|
||||
|xtable |1.8-4 |2019-04-21 |CRAN (R 4.4.1) |
|
||||
|yaml |2.3.11 |2025-11-28 |CRAN (R 4.4.3) |
|
||||
|zip |2.3.3 |2025-05-13 |CRAN (R 4.4.1) |
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
FROM rocker/tidyverse:4.5.2
|
||||
FROM rocker/tidyverse:4.4.1
|
||||
RUN apt-get update -y && apt-get install -y cmake make libcurl4-openssl-dev libicu-dev libssl-dev pandoc zlib1g-dev libsecret-1-dev libxml2-dev libx11-dev libcairo2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjpeg-dev libpng-dev libtiff-dev libwebp-dev libfftw3-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/
|
||||
RUN echo "options(renv.config.pak.enabled = FALSE, repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site
|
||||
RUN R -e 'install.packages("remotes")'
|
||||
RUN R -e 'remotes::install_version("renv", version = "1.1.7")'
|
||||
RUN R -e 'remotes::install_version("renv", version = "1.1.5")'
|
||||
COPY renv.lock renv.lock
|
||||
RUN --mount=type=cache,id=renv-cache,target=/root/.cache/R/renv R -e 'renv::restore()'
|
||||
WORKDIR /srv/shiny-server/
|
||||
|
|
|
|||
2216
app_docker/app.R
2216
app_docker/app.R
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,7 @@
|
|||
"REDCap server export","Eksport fra REDCap server"
|
||||
"Local or sample data","Lokal eller testdata"
|
||||
"Please be mindfull handling sensitive data","Pas godt på og overvej nøje hvordan du håndterer personfølsomme data"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","***FreesearchR*** opbevarer alene data i forbindelse med din analyse, men du bør kun behandle personfølsomme data når du kører ***FreesearchR*** direkte på din egen maskine. [Læs mere her](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Hurtigt overblik"
|
||||
"Select variables for final import","Vælg variabler til den endelige import"
|
||||
"Exclude incomplete variables:","Ekskluder inkomplette variabler:"
|
||||
|
|
@ -23,11 +24,16 @@
|
|||
"Apply filter on observation","Anvend filtre af observationer"
|
||||
"Edit and create data","Ændr og opret variabler"
|
||||
"Subset, rename and convert variables","Udvælg, omdøb og konverter variabler"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Nedenfor er der mulighed for at lave simple ændringer i dit datasæt, såsom at redigere variabelnavne eller beskrivelser (bedre tabeller), eller omklassificering af variabler (numerisk, factoriel/kategorisk)."
|
||||
"Please note that data modifications are applied before any filtering.","Bemærk at alle ændringer i data anvendes inden filtreringen."
|
||||
"Advanced data manipulation","Avanceret datamanipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Nedenfor er mulighed for avancerede ændringer i data."
|
||||
"New factor","Ny faktor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Opret kategorisk variabel på baggrund af kontinuert variabel (numerisk/dato/tid)."
|
||||
"New variable","Ny variabel"
|
||||
"Create a new variable based on an R-expression.","Opret ny variabel baseret på R-kode."
|
||||
"Compare modified data to original","Sammenlign ændret data med det originale datasæt"
|
||||
"Raw print of the original vs the modified data.","Simpel sammenligning af det originale og det ændrede datasæt."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Ændret data:"
|
||||
"New column name:","Navn til ny variabel:"
|
||||
|
|
@ -58,6 +64,7 @@
|
|||
"Imported data","Importeret data"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Choose your data","Vælg dine data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload en fil, hent data direkte fra en REDCap-server eller brug test-data eller lokal data."
|
||||
"Factor variable to reorder:","Kategoriske variabel der skal ændres:"
|
||||
"Sort by levels","Sorter efter niveauer"
|
||||
"Sort by count","Sorter efter antal"
|
||||
|
|
@ -88,7 +95,9 @@
|
|||
"Visuals","Grafik"
|
||||
"Regression","Regression"
|
||||
"Download","Download"
|
||||
"{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.","Ved 0 inkluderes alene komplette variabler; ved 100 inkluderes alle variabler."
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","De følgende variabel-par er stærkt korrelerede: {sentence_paste(.x,and_str)}.\nOvervej at fjerne en {more}fra datasættet for at sikre at prædiktorer er internt uafhængige."
|
||||
"No variables have a correlation measure above the threshold.","Ingen variabler er korrelerede over den angivne tærskelværdi."
|
||||
"and","og"
|
||||
|
|
@ -132,17 +141,23 @@
|
|||
"Create plot","Dan grafik"
|
||||
"Coefficients plot","Koefficientgraf"
|
||||
"Checks","Test af model"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Nedenfor er en opsummerende tabel, der giver hurtigt overblik. Til højre kan du få et visuelt overblik, gennemgå observationer og oprette datafiltre."
|
||||
"Browse observations","Gennemse observationer"
|
||||
"Settings","Indstillinger"
|
||||
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
|
||||
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
|
||||
"No missing observations","Ingen manglende observationer"
|
||||
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Gendan originale data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Gendan det oprindeligt importerede datasæt. Forsigtig! Alle dine ændringer vil forsvinde."
|
||||
"Characteristics","Karakteristika"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Alene kategoriske variabler kan danne grundlag for stratificering. Mangler du en variabel, så gå til ""Forbered"" og omklassificer til kategorisk."
|
||||
"Compare strata?","Sammenlign strata?"
|
||||
"Correlations","Korrelationer"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","For at udelukke svarvariablen fra korrelationsanalysen, så kan du vælge din svarvariabel eller vælge 'non', hvis du ikke vil angive en."
|
||||
"Correlation cut-off","Korrelationsgrænse"
|
||||
"Set the cut-off for considered 'highly correlated'.","Angiv grænsen for. hvad, der tolkes som 'betydelig korrelation'."
|
||||
"Missings","Manglende observationer"
|
||||
"Class","Klasse"
|
||||
"Observations","Observationer"
|
||||
|
|
@ -152,9 +167,11 @@
|
|||
"Confirm","Bekræft"
|
||||
"The filtered data","Filtreret data"
|
||||
"Create new factor","Ny kategorisk variabel"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","Dette vindue er primært for avancerede brugere med nogen *R*-erfaring!"
|
||||
"Create new variables","Opret nye variabler"
|
||||
"Select data types to include","Vælg datatyper, der skal inkluderes"
|
||||
"Uploaded data overview","Overblik over uploaded data"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Her har du en oversigt over hvordan data er blevet formateret, og hvor der er manglende observationer. Brug informationen til at overveje om manglende data mangler tilfældigt eller og der er et mønster, som kan være et udtryk for systematisk manglende data (observationsbias)."
|
||||
"Specify covariables","Angiv kovariabler"
|
||||
"If none are selected, all are included.","Hvis ingen er valgt inkluderes alle."
|
||||
"Analyse","Analysér"
|
||||
|
|
@ -192,6 +209,7 @@
|
|||
"List of datasets...","Liste af datasæt..."
|
||||
"No data selected!","Ingen data valgt!"
|
||||
"No dataset here...","Ingen datasæt her..."
|
||||
"Use a dataset from your environment or from the environment of a package.","Brug et datasæt fra dit lokale kodemiljø eller fra en tilgængelig pakke."
|
||||
"Not a data.frame","Ikke en data.frame"
|
||||
"Select source","Vælg datakilde"
|
||||
"Select a data source:","Vælg datakilde:"
|
||||
|
|
@ -211,6 +229,7 @@
|
|||
"Multivariable regression model checks","Tests af multivariabel regressionsmodel"
|
||||
"Grouped by {get_label(data,ter)}","Grupperet efter {get_label(data,ter)}"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Mulighed for at udføre statistiske tests mellem strata i oversigtstabellen."
|
||||
"Press 'Evaluate' to create the comparison table.","Tryk 'Evaluér' for at oprette en oversigtstabel."
|
||||
"The data includes {n_col} variables. Please limit to 100.","Data indeholder {n_col} variabler. Begræns venligst til 100."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Formatering af data ved import"
|
||||
|
|
@ -242,6 +261,7 @@
|
|||
"By specified numbers","Efter specifikke værdier"
|
||||
"By quantiles (groups of equal size)","I grupper af samme størrelse"
|
||||
"By week number","Efter ugenummer alene"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Der er mere avancerede muligheder for at ændre kategoriske variable, oprette nye kategoriske variabler fra eksisterende data eller nye variable baseret på R-kode. Nederst kan du gendanne originale data."
|
||||
"Split the variable","Opdel variablen"
|
||||
"Original data","Oprindelige data"
|
||||
"Preview of result","Forhåndsvisning af resultat"
|
||||
|
|
@ -255,6 +275,7 @@
|
|||
"Browse data preview","Forhåndsvisning af resultat"
|
||||
"Split character string","Opdel tegnstreng"
|
||||
"Split text","Opdel tekst"
|
||||
"Split a text column by a recognised delimiter.","Ingen tegnvariabler med accepterede afgrænsere fundet."
|
||||
"Split a character string by a common delimiter","Opdel en tekstkolonne med en fælles afgrænser"
|
||||
"Apply split","Anvend opdeling"
|
||||
"Stacked relative barplot","Stablet relativt søjlediagram"
|
||||
|
|
@ -269,10 +290,14 @@
|
|||
"Words","Ord"
|
||||
"Shorten to first letters","Afkort til første bogstaver"
|
||||
"Shorten to first words","Afkort til de første ord"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Manglende værdier på tværs af variablerne **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Manglende vs. ikke-manglende observationer i variablen **'{input$missings_var}'**"
|
||||
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluer manglende værdier ved enten at sammenligne manglende værdier på tværs af variabler (valgfrit grupperet efter en kategorisk eller dikotom variabel) eller sammenligne variabler grupperet efter manglende status (mangler eller ej) for en udfaldsvariabel. Hvis der er en signifikant forskel i manglende værdier, kan dette forårsage en bias i dine data, og det bør overvejes omhyggeligt at fortolke dataene og analyserne, da data muligvis ikke mangler tilfældigt."
|
||||
"Calculating. Hold tight for a moment..","Beregner. Hold lige fast et øjeblik.."
|
||||
"Overview of missing observations","Oversigt over manglende observationer"
|
||||
"Analysis method for missingness overview","Analysemetode for oversigt over manglende indhold"
|
||||
"Overview of missings across variables","Oversigt over mangler på tværs af variabler"
|
||||
"Overview of difference in variables by missing status in outcome","Oversigt over forskel i variabler ved manglende status i resultat"
|
||||
"Select a variable for grouped overview","Vælg en variabel til grupperet oversigt"
|
||||
"Select outcome variable for overview","Vælg resultatvariabel for oversigt"
|
||||
"No outcome measure chosen","Ingen resultatmål valgt"
|
||||
|
|
@ -316,14 +341,3 @@
|
|||
"Reorder factor levels","Omarranger niveauer"
|
||||
"Modify factor levels","Modify factor levels"
|
||||
"Reorder or rename the levels of factor/categorical variables.","Reorder or rename the levels of factor/categorical variables."
|
||||
"Maximum number of observations:","Maximum number of observations:"
|
||||
"setting to 0 includes all","setting to 0 includes all"
|
||||
"Select a dataset from your environment or sample dataset from a package.","Select a dataset from your environment or sample dataset from a package."
|
||||
"Select a sample dataset from a package.","Select a sample dataset from a package."
|
||||
"Data ready to be imported!","Data ready to be imported!"
|
||||
"Data has %s obs. of %s variables.","Data has %s obs. of %s variables."
|
||||
"Data successfully imported!","Data successfully imported!"
|
||||
"Click to see data","Click to see data"
|
||||
"No data present.","No data present."
|
||||
"You have provided a complete dataset with no missing values.","You have provided a complete dataset with no missing values."
|
||||
"Start by loading data.","Start by loading data."
|
||||
|
|
|
|||
|
|
|
@ -5,6 +5,7 @@
|
|||
"REDCap server export","Usafirishaji wa seva ya REDCap"
|
||||
"Local or sample data","Data ya ndani au ya sampuli"
|
||||
"Please be mindfull handling sensitive data","Tafadhali kuwa mwangalifu kushughulikia data nyeti"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","Programu ya ***FreesearchR*** huhifadhi data kwa ajili ya uchambuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani. [Soma zaidi hapa](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Muhtasari wa haraka"
|
||||
"Select variables for final import","Chagua vigezo vya kuingiza mwisho"
|
||||
"Exclude incomplete variables:","Ondoa vigezo visivyokamilika:"
|
||||
|
|
@ -23,11 +24,16 @@
|
|||
"Apply filter on observation","Tumia kichujio wakati wa uchunguzi"
|
||||
"Edit and create data","Hariri na uunde data"
|
||||
"Subset, rename and convert variables","Weka sehemu ndogo, badilisha jina na ubadilishe vigezo"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Hapa chini, kuna chaguo kadhaa za urekebishaji rahisi wa data kama vile kusasisha vigezo kwa kubadilisha majina, kuunda lebo mpya (kwa majedwali mazuri zaidi katika ripoti) na kubadilisha madarasa ya vigezo (nambari, vipengele/kategoria n.k.)."
|
||||
"Please note that data modifications are applied before any filtering.","Tafadhali kumbuka kwamba marekebisho ya data hutumika kabla ya kuchuja yoyote."
|
||||
"Advanced data manipulation","Udhibiti wa data wa hali ya juu"
|
||||
"Below options allow more advanced varaible manipulations.","Chaguzi zilizo hapa chini huruhusu udanganyifu wa hali ya juu zaidi unaoweza kubadilika."
|
||||
"New factor","Kipengele kipya"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Unda kigezo cha kipengele/kitengo kutoka kwa kigezo endelevu (nambari/tarehe/saa)."
|
||||
"New variable","Kigezo kipya"
|
||||
"Create a new variable based on an R-expression.","Unda kigezo kipya kulingana na usemi wa R."
|
||||
"Compare modified data to original","Linganisha data iliyobadilishwa na ya asili"
|
||||
"Raw print of the original vs the modified data.","Chapisho ghafi la data asili dhidi ya data iliyorekebishwa."
|
||||
"Original data:","Data asilia:"
|
||||
"Modified data:","Data iliyorekebishwa:"
|
||||
"New column name:","Jina jipya la safu wima:"
|
||||
|
|
@ -58,6 +64,7 @@
|
|||
"Imported data","Data iliyoingizwa"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Choose your data","Chagua data yako"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Pakia faili, pata data moja kwa moja kutoka REDCap au tumia data ya ndani au sampuli."
|
||||
"Factor variable to reorder:","Kigezo cha vipengele ili kupanga upya:"
|
||||
"Sort by levels","Panga kwa viwango"
|
||||
"Sort by count","Panga kwa hesabu"
|
||||
|
|
@ -88,7 +95,9 @@
|
|||
"Visuals","Picha"
|
||||
"Regression","Urejeshaji"
|
||||
"Download","Pakua"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} ina uchunguzi wa {n} na vigezo vya {n_var}, pamoja na visa kamili vya {n_complete} ({p_complete}%)."
|
||||
"Prepare","Tayarisha"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","Katika 0, ni vigezo kamili pekee vilivyojumuishwa; katika 100, vigezo vyote vimejumuishwa."
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","Jozi zifuatazo za vigeu zina uhusiano wa hali ya juu: {sentence_paste(.x,and_str)}.\nFikiria kutenga moja {zaidi} kutoka kwenye seti ya data ili kuhakikisha vigeu vinajitegemea."
|
||||
"No variables have a correlation measure above the threshold.","Hakuna vigezo vyenye kipimo cha uhusiano kilicho juu ya kizingiti."
|
||||
"and","na"
|
||||
|
|
@ -132,17 +141,23 @@
|
|||
"Create plot","Unda njama"
|
||||
"Coefficients plot","Mchoro wa viambato"
|
||||
"Checks","Hundi"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Hapa chini kuna jedwali la muhtasari kwa ajili ya ufahamu wa haraka, na upande wa kulia unaweza kuibua madarasa ya data, kuvinjari uchunguzi na kutumia vichujio tofauti vya data."
|
||||
"Browse observations","Vinjari uchunguzi"
|
||||
"Settings","Mipangilio"
|
||||
"The following error occured on determining correlations:","Hitilafu ifuatayo ilitokea katika kubaini uhusiano:"
|
||||
"We encountered the following error creating your report:","Tulikutana na hitilafu ifuatayo katika kuunda ripoti yako:"
|
||||
"No missing observations","Hakuna uchunguzi unaokosekana"
|
||||
"There is a total of {p_miss} % missing observations.","Kuna jumla ya uchunguzi wa {p_miss}% unaokosekana."
|
||||
"Median:","Wastani:"
|
||||
"Restore original data","Rejesha data asili"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Rudisha kwenye seti ya data asili iliyoingizwa. Kuwa mwangalifu! Hakuna kutengua."
|
||||
"Characteristics","Sifa"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Vigezo vya vipengele/kategoria pekee ndivyo vinavyopatikana kwa ajili ya uainishaji wa tabaka. Rudi kwenye kichupo cha 'Tayarisha' ili kupanga upya kigezo ikiwa hakipo kwenye orodha."
|
||||
"Compare strata?","Linganisha tabaka?"
|
||||
"Correlations","Uhusiano"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","Ili kuepuka kutathmini uhusiano wa kigezo cha matokeo, hii inaweza kutengwa kwenye njama au kuchagua 'hakuna'."
|
||||
"Correlation cut-off","Kikomo cha uhusiano"
|
||||
"Set the cut-off for considered 'highly correlated'.","Weka kikomo cha 'kinachohusiana sana'."
|
||||
"Missings","Hazipo"
|
||||
"Class","Darasa"
|
||||
"Observations","Uchunguzi"
|
||||
|
|
@ -152,9 +167,11 @@
|
|||
"Confirm","Thibitisha"
|
||||
"The filtered data","Data iliyochujwa"
|
||||
"Create new factor","Unda kipengele kipya"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","Dirisha hili linalenga watumiaji wa hali ya juu na linahitaji uzoefu wa *R*!"
|
||||
"Create new variables","Unda vigezo vipya"
|
||||
"Select data types to include","Chagua aina za data za kujumuisha"
|
||||
"Uploaded data overview","Muhtasari wa data iliyopakiwa"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Hapa kuna muhtasari wa jinsi data yako inavyotafsiriwa, na mahali ambapo data inakosekana. Tumia taarifa hii kuzingatia ikiwa data inakosekana bila mpangilio au ikiwa baadhi ya uchunguzi unakosekana kimfumo ambao unaweza kusababishwa na upendeleo wa uchunguzi."
|
||||
"Specify covariables","Bainisha vigeu vinavyoweza kuunganishwa"
|
||||
"If none are selected, all are included.","Ikiwa hakuna aliyechaguliwa, wote wamejumuishwa."
|
||||
"Analyse","Changanua"
|
||||
|
|
@ -192,6 +209,7 @@
|
|||
"List of datasets...","Orodha ya seti za data..."
|
||||
"No data selected!","Hakuna data iliyochaguliwa!"
|
||||
"No dataset here...","Hakuna seti ya data hapa..."
|
||||
"Use a dataset from your environment or from the environment of a package.","Tumia seti ya data kutoka kwa mazingira yako au kutoka kwa mazingira ya kifurushi."
|
||||
"Not a data.frame","Sio data.frame"
|
||||
"Select source","Chagua chanzo"
|
||||
"Select a data source:","Chagua chanzo cha data:"
|
||||
|
|
@ -211,6 +229,7 @@
|
|||
"Multivariable regression model checks","Ukaguzi wa modeli ya urejeshaji unaoweza kubadilika-badilika"
|
||||
"Grouped by {get_label(data,ter)}","Imepangwa kwa makundi kulingana na {get_label(data,ter)}"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Chaguo la kufanya ulinganisho wa takwimu kati ya tabaka katika jedwali la msingi."
|
||||
"Press 'Evaluate' to create the comparison table.","Bonyeza 'Tathmini' ili kuunda jedwali la kulinganisha."
|
||||
"The data includes {n_col} variables. Please limit to 100.","Data inajumuisha vigezo vya {n_col}. Tafadhali punguza hadi 100."
|
||||
"Data import","Uingizaji wa data"
|
||||
"Data import formatting","Uumbizaji wa kuingiza data"
|
||||
|
|
@ -242,6 +261,7 @@
|
|||
"By specified numbers","Kwa nambari zilizoainishwa"
|
||||
"By quantiles (groups of equal size)","Kwa quantiles (vikundi vya ukubwa sawa)"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Tafadhali jaza anwani ya wavuti na tokeni ya API, kisha bonyeza 'Unganisha'."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Kuna chaguo za hali ya juu zaidi za kurekebisha vigezo vya vipengele/kategoria pamoja na kuunda kipengele kipya kutoka kwa kigezo kilichopo au vigezo vipya vyenye msimbo wa R. Chini unaweza kurejesha data asili."
|
||||
"Text or character to split string by","Maandishi au herufi ya kugawanya mfuatano kwa"
|
||||
"Split the variable","Gawanya kigezo"
|
||||
"Variable to split:","Kinachoweza kubadilika hadi kugawanyika:"
|
||||
|
|
@ -256,6 +276,7 @@
|
|||
"Original data","Data asili"
|
||||
"Preview of result","Hakikisho la matokeo"
|
||||
"No character variables with accepted delimiters detected.","Hakuna vigezo vya herufi vilivyo na vidhibiti vinavyokubalika vilivyogunduliwa."
|
||||
"Split a text column by a recognised delimiter.","Gawanya safu wima ya maandishi kwa kitenga kinachotambulika."
|
||||
"Apply split","Tumia mgawanyiko"
|
||||
"Stacked relative barplot","Kipande cha baruni kilichopangwa kwa mirundiko"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Unda viwanja vya baruni vilivyopangwa ili kuonyesha usambazaji wa viwango vya kategoria"
|
||||
|
|
@ -269,10 +290,14 @@
|
|||
"Words","Maneno"
|
||||
"Shorten to first letters","Fupisha herufi za kwanza"
|
||||
"Shorten to first words","Fupisha maneno ya kwanza"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Hazipo katika vigezo kwa kigezo **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Uchunguzi unaokosekana dhidi ya usiokosekana katika kigezo **'{input$missings_var}'**"
|
||||
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Tathmini upungufu kwa kulinganisha thamani zinazokosekana katika vigezo (hiari zilizopangwa kwa mujibu wa kigezo cha kategoria au cha pande mbili) au linganisha vigezo vilivyopangwa kwa mujibu wa hali inayokosekana (inayokosekana au isiyokosekana) ya kigezo cha matokeo. Ikiwa kuna tofauti kubwa katika upungufu, hii inaweza kusababisha upendeleo katika data yako na inapaswa kuzingatiwa kwa uangalifu kutafsiri data na uchambuzi kwani data inaweza isikosekane bila mpangilio."
|
||||
"Calculating. Hold tight for a moment..","Kuhesabu. Shikilia kwa muda.."
|
||||
"Overview of missing observations","Muhtasari wa uchunguzi uliokosekana"
|
||||
"Analysis method for missingness overview","Mbinu ya uchambuzi wa muhtasari wa kukosekana"
|
||||
"Overview of missings across variables","Muhtasari wa mambo yanayokosekana katika vigezo"
|
||||
"Overview of difference in variables by missing status in outcome","Muhtasari wa tofauti katika vigezo kwa kukosa hali katika matokeo"
|
||||
"Select a variable for grouped overview","Chagua kigezo cha muhtasari wa kikundi"
|
||||
"Select outcome variable for overview","Chagua kigezo cha matokeo kwa muhtasari"
|
||||
"No outcome measure chosen","Hakuna kipimo cha matokeo kilichochaguliwa"
|
||||
|
|
@ -316,14 +341,3 @@
|
|||
"Reorder factor levels","Reorder factor levels"
|
||||
"Modify factor levels","Modify factor levels"
|
||||
"Reorder or rename the levels of factor/categorical variables.","Reorder or rename the levels of factor/categorical variables."
|
||||
"Maximum number of observations:","Maximum number of observations:"
|
||||
"setting to 0 includes all","setting to 0 includes all"
|
||||
"Select a dataset from your environment or sample dataset from a package.","Select a dataset from your environment or sample dataset from a package."
|
||||
"Select a sample dataset from a package.","Select a sample dataset from a package."
|
||||
"Data ready to be imported!","Data ready to be imported!"
|
||||
"Data has %s obs. of %s variables.","Data has %s obs. of %s variables."
|
||||
"Data successfully imported!","Data successfully imported!"
|
||||
"Click to see data","Click to see data"
|
||||
"No data present.","No data present."
|
||||
"You have provided a complete dataset with no missing values.","You have provided a complete dataset with no missing values."
|
||||
"Start by loading data.","Start by loading data."
|
||||
|
|
|
|||
|
File diff suppressed because it is too large
Load diff
|
|
@ -5,6 +5,7 @@
|
|||
"REDCap server export","Eksport fra REDCap server"
|
||||
"Local or sample data","Lokal eller testdata"
|
||||
"Please be mindfull handling sensitive data","Pas godt på og overvej nøje hvordan du håndterer personfølsomme data"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","***FreesearchR*** opbevarer alene data i forbindelse med din analyse, men du bør kun behandle personfølsomme data når du kører ***FreesearchR*** direkte på din egen maskine. [Læs mere her](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Hurtigt overblik"
|
||||
"Select variables for final import","Vælg variabler til den endelige import"
|
||||
"Exclude incomplete variables:","Ekskluder inkomplette variabler:"
|
||||
|
|
@ -23,11 +24,16 @@
|
|||
"Apply filter on observation","Anvend filtre af observationer"
|
||||
"Edit and create data","Ændr og opret variabler"
|
||||
"Subset, rename and convert variables","Udvælg, omdøb og konverter variabler"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Nedenfor er der mulighed for at lave simple ændringer i dit datasæt, såsom at redigere variabelnavne eller beskrivelser (bedre tabeller), eller omklassificering af variabler (numerisk, factoriel/kategorisk)."
|
||||
"Please note that data modifications are applied before any filtering.","Bemærk at alle ændringer i data anvendes inden filtreringen."
|
||||
"Advanced data manipulation","Avanceret datamanipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Nedenfor er mulighed for avancerede ændringer i data."
|
||||
"New factor","Ny faktor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Opret kategorisk variabel på baggrund af kontinuert variabel (numerisk/dato/tid)."
|
||||
"New variable","Ny variabel"
|
||||
"Create a new variable based on an R-expression.","Opret ny variabel baseret på R-kode."
|
||||
"Compare modified data to original","Sammenlign ændret data med det originale datasæt"
|
||||
"Raw print of the original vs the modified data.","Simpel sammenligning af det originale og det ændrede datasæt."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Ændret data:"
|
||||
"New column name:","Navn til ny variabel:"
|
||||
|
|
@ -58,6 +64,7 @@
|
|||
"Imported data","Importeret data"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Choose your data","Vælg dine data"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Upload en fil, hent data direkte fra en REDCap-server eller brug test-data eller lokal data."
|
||||
"Factor variable to reorder:","Kategoriske variabel der skal ændres:"
|
||||
"Sort by levels","Sorter efter niveauer"
|
||||
"Sort by count","Sorter efter antal"
|
||||
|
|
@ -88,7 +95,9 @@
|
|||
"Visuals","Grafik"
|
||||
"Regression","Regression"
|
||||
"Download","Download"
|
||||
"{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.","Ved 0 inkluderes alene komplette variabler; ved 100 inkluderes alle variabler."
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","De følgende variabel-par er stærkt korrelerede: {sentence_paste(.x,and_str)}.\nOvervej at fjerne en {more}fra datasættet for at sikre at prædiktorer er internt uafhængige."
|
||||
"No variables have a correlation measure above the threshold.","Ingen variabler er korrelerede over den angivne tærskelværdi."
|
||||
"and","og"
|
||||
|
|
@ -132,17 +141,23 @@
|
|||
"Create plot","Dan grafik"
|
||||
"Coefficients plot","Koefficientgraf"
|
||||
"Checks","Test af model"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Nedenfor er en opsummerende tabel, der giver hurtigt overblik. Til højre kan du få et visuelt overblik, gennemgå observationer og oprette datafiltre."
|
||||
"Browse observations","Gennemse observationer"
|
||||
"Settings","Indstillinger"
|
||||
"The following error occured on determining correlations:","Følgende fejl opstod i forbindelse med korrelationsanalysen:"
|
||||
"We encountered the following error creating your report:","Følgende fejl opstod, da rapporten blev dannet:"
|
||||
"No missing observations","Ingen manglende observationer"
|
||||
"There is a total of {p_miss} % missing observations.","Der er i alt {p_miss} % manglende observationer."
|
||||
"Median:","Median:"
|
||||
"Restore original data","Gendan originale data"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Gendan det oprindeligt importerede datasæt. Forsigtig! Alle dine ændringer vil forsvinde."
|
||||
"Characteristics","Karakteristika"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Alene kategoriske variabler kan danne grundlag for stratificering. Mangler du en variabel, så gå til ""Forbered"" og omklassificer til kategorisk."
|
||||
"Compare strata?","Sammenlign strata?"
|
||||
"Correlations","Korrelationer"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","For at udelukke svarvariablen fra korrelationsanalysen, så kan du vælge din svarvariabel eller vælge 'non', hvis du ikke vil angive en."
|
||||
"Correlation cut-off","Korrelationsgrænse"
|
||||
"Set the cut-off for considered 'highly correlated'.","Angiv grænsen for. hvad, der tolkes som 'betydelig korrelation'."
|
||||
"Missings","Manglende observationer"
|
||||
"Class","Klasse"
|
||||
"Observations","Observationer"
|
||||
|
|
@ -152,9 +167,11 @@
|
|||
"Confirm","Bekræft"
|
||||
"The filtered data","Filtreret data"
|
||||
"Create new factor","Ny kategorisk variabel"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","Dette vindue er primært for avancerede brugere med nogen *R*-erfaring!"
|
||||
"Create new variables","Opret nye variabler"
|
||||
"Select data types to include","Vælg datatyper, der skal inkluderes"
|
||||
"Uploaded data overview","Overblik over uploaded data"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Her har du en oversigt over hvordan data er blevet formateret, og hvor der er manglende observationer. Brug informationen til at overveje om manglende data mangler tilfældigt eller og der er et mønster, som kan være et udtryk for systematisk manglende data (observationsbias)."
|
||||
"Specify covariables","Angiv kovariabler"
|
||||
"If none are selected, all are included.","Hvis ingen er valgt inkluderes alle."
|
||||
"Analyse","Analysér"
|
||||
|
|
@ -192,6 +209,7 @@
|
|||
"List of datasets...","Liste af datasæt..."
|
||||
"No data selected!","Ingen data valgt!"
|
||||
"No dataset here...","Ingen datasæt her..."
|
||||
"Use a dataset from your environment or from the environment of a package.","Brug et datasæt fra dit lokale kodemiljø eller fra en tilgængelig pakke."
|
||||
"Not a data.frame","Ikke en data.frame"
|
||||
"Select source","Vælg datakilde"
|
||||
"Select a data source:","Vælg datakilde:"
|
||||
|
|
@ -211,6 +229,7 @@
|
|||
"Multivariable regression model checks","Tests af multivariabel regressionsmodel"
|
||||
"Grouped by {get_label(data,ter)}","Grupperet efter {get_label(data,ter)}"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Mulighed for at udføre statistiske tests mellem strata i oversigtstabellen."
|
||||
"Press 'Evaluate' to create the comparison table.","Tryk 'Evaluér' for at oprette en oversigtstabel."
|
||||
"The data includes {n_col} variables. Please limit to 100.","Data indeholder {n_col} variabler. Begræns venligst til 100."
|
||||
"Data import","Data import"
|
||||
"Data import formatting","Formatering af data ved import"
|
||||
|
|
@ -242,6 +261,7 @@
|
|||
"By specified numbers","Efter specifikke værdier"
|
||||
"By quantiles (groups of equal size)","I grupper af samme størrelse"
|
||||
"By week number","Efter ugenummer alene"
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Der er mere avancerede muligheder for at ændre kategoriske variable, oprette nye kategoriske variabler fra eksisterende data eller nye variable baseret på R-kode. Nederst kan du gendanne originale data."
|
||||
"Split the variable","Opdel variablen"
|
||||
"Original data","Oprindelige data"
|
||||
"Preview of result","Forhåndsvisning af resultat"
|
||||
|
|
@ -255,6 +275,7 @@
|
|||
"Browse data preview","Forhåndsvisning af resultat"
|
||||
"Split character string","Opdel tegnstreng"
|
||||
"Split text","Opdel tekst"
|
||||
"Split a text column by a recognised delimiter.","Ingen tegnvariabler med accepterede afgrænsere fundet."
|
||||
"Split a character string by a common delimiter","Opdel en tekstkolonne med en fælles afgrænser"
|
||||
"Apply split","Anvend opdeling"
|
||||
"Stacked relative barplot","Stablet relativt søjlediagram"
|
||||
|
|
@ -269,10 +290,14 @@
|
|||
"Words","Ord"
|
||||
"Shorten to first letters","Afkort til første bogstaver"
|
||||
"Shorten to first words","Afkort til de første ord"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Manglende værdier på tværs af variablerne **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Manglende vs. ikke-manglende observationer i variablen **'{input$missings_var}'**"
|
||||
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Evaluer manglende værdier ved enten at sammenligne manglende værdier på tværs af variabler (valgfrit grupperet efter en kategorisk eller dikotom variabel) eller sammenligne variabler grupperet efter manglende status (mangler eller ej) for en udfaldsvariabel. Hvis der er en signifikant forskel i manglende værdier, kan dette forårsage en bias i dine data, og det bør overvejes omhyggeligt at fortolke dataene og analyserne, da data muligvis ikke mangler tilfældigt."
|
||||
"Calculating. Hold tight for a moment..","Beregner. Hold lige fast et øjeblik.."
|
||||
"Overview of missing observations","Oversigt over manglende observationer"
|
||||
"Analysis method for missingness overview","Analysemetode for oversigt over manglende indhold"
|
||||
"Overview of missings across variables","Oversigt over mangler på tværs af variabler"
|
||||
"Overview of difference in variables by missing status in outcome","Oversigt over forskel i variabler ved manglende status i resultat"
|
||||
"Select a variable for grouped overview","Vælg en variabel til grupperet oversigt"
|
||||
"Select outcome variable for overview","Vælg resultatvariabel for oversigt"
|
||||
"No outcome measure chosen","Ingen resultatmål valgt"
|
||||
|
|
@ -316,14 +341,3 @@
|
|||
"Reorder factor levels","Omarranger niveauer"
|
||||
"Modify factor levels","Modify factor levels"
|
||||
"Reorder or rename the levels of factor/categorical variables.","Reorder or rename the levels of factor/categorical variables."
|
||||
"Maximum number of observations:","Maximum number of observations:"
|
||||
"setting to 0 includes all","setting to 0 includes all"
|
||||
"Select a dataset from your environment or sample dataset from a package.","Select a dataset from your environment or sample dataset from a package."
|
||||
"Select a sample dataset from a package.","Select a sample dataset from a package."
|
||||
"Data ready to be imported!","Data ready to be imported!"
|
||||
"Data has %s obs. of %s variables.","Data has %s obs. of %s variables."
|
||||
"Data successfully imported!","Data successfully imported!"
|
||||
"Click to see data","Click to see data"
|
||||
"No data present.","No data present."
|
||||
"You have provided a complete dataset with no missing values.","You have provided a complete dataset with no missing values."
|
||||
"Start by loading data.","Start by loading data."
|
||||
|
|
|
|||
|
|
|
@ -5,6 +5,7 @@
|
|||
"REDCap server export","Usafirishaji wa seva ya REDCap"
|
||||
"Local or sample data","Data ya ndani au ya sampuli"
|
||||
"Please be mindfull handling sensitive data","Tafadhali kuwa mwangalifu kushughulikia data nyeti"
|
||||
"The ***FreesearchR*** app only stores data for analyses, but please only use with sensitive data when running locally. [Read more here](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine).","Programu ya ***FreesearchR*** huhifadhi data kwa ajili ya uchambuzi pekee, lakini tafadhali tumia tu na data nyeti unapoendesha ndani. [Soma zaidi hapa](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine)."
|
||||
"Quick overview","Muhtasari wa haraka"
|
||||
"Select variables for final import","Chagua vigezo vya kuingiza mwisho"
|
||||
"Exclude incomplete variables:","Ondoa vigezo visivyokamilika:"
|
||||
|
|
@ -23,11 +24,16 @@
|
|||
"Apply filter on observation","Tumia kichujio wakati wa uchunguzi"
|
||||
"Edit and create data","Hariri na uunde data"
|
||||
"Subset, rename and convert variables","Weka sehemu ndogo, badilisha jina na ubadilishe vigezo"
|
||||
"Below, are several options for simple data manipulation like update variables by renaming, creating new labels (for nicer tables in the report) and changing variable classes (numeric, factor/categorical etc.).","Hapa chini, kuna chaguo kadhaa za urekebishaji rahisi wa data kama vile kusasisha vigezo kwa kubadilisha majina, kuunda lebo mpya (kwa majedwali mazuri zaidi katika ripoti) na kubadilisha madarasa ya vigezo (nambari, vipengele/kategoria n.k.)."
|
||||
"Please note that data modifications are applied before any filtering.","Tafadhali kumbuka kwamba marekebisho ya data hutumika kabla ya kuchuja yoyote."
|
||||
"Advanced data manipulation","Udhibiti wa data wa hali ya juu"
|
||||
"Below options allow more advanced varaible manipulations.","Chaguzi zilizo hapa chini huruhusu udanganyifu wa hali ya juu zaidi unaoweza kubadilika."
|
||||
"New factor","Kipengele kipya"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Unda kigezo cha kipengele/kitengo kutoka kwa kigezo endelevu (nambari/tarehe/saa)."
|
||||
"New variable","Kigezo kipya"
|
||||
"Create a new variable based on an R-expression.","Unda kigezo kipya kulingana na usemi wa R."
|
||||
"Compare modified data to original","Linganisha data iliyobadilishwa na ya asili"
|
||||
"Raw print of the original vs the modified data.","Chapisho ghafi la data asili dhidi ya data iliyorekebishwa."
|
||||
"Original data:","Data asilia:"
|
||||
"Modified data:","Data iliyorekebishwa:"
|
||||
"New column name:","Jina jipya la safu wima:"
|
||||
|
|
@ -58,6 +64,7 @@
|
|||
"Imported data","Data iliyoingizwa"
|
||||
"www/intro.md","www/intro.md"
|
||||
"Choose your data","Chagua data yako"
|
||||
"Upload a file, get data directly from REDCap or use local or sample data.","Pakia faili, pata data moja kwa moja kutoka REDCap au tumia data ya ndani au sampuli."
|
||||
"Factor variable to reorder:","Kigezo cha vipengele ili kupanga upya:"
|
||||
"Sort by levels","Panga kwa viwango"
|
||||
"Sort by count","Panga kwa hesabu"
|
||||
|
|
@ -88,7 +95,9 @@
|
|||
"Visuals","Picha"
|
||||
"Regression","Urejeshaji"
|
||||
"Download","Pakua"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} ina uchunguzi wa {n} na vigezo vya {n_var}, pamoja na visa kamili vya {n_complete} ({p_complete}%)."
|
||||
"Prepare","Tayarisha"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","Katika 0, ni vigezo kamili pekee vilivyojumuishwa; katika 100, vigezo vyote vimejumuishwa."
|
||||
"The following variable pairs are highly correlated: {sentence_paste(.x,and_str)}.\nConsider excluding one {more}from the dataset to ensure variables are independent.","Jozi zifuatazo za vigeu zina uhusiano wa hali ya juu: {sentence_paste(.x,and_str)}.\nFikiria kutenga moja {zaidi} kutoka kwenye seti ya data ili kuhakikisha vigeu vinajitegemea."
|
||||
"No variables have a correlation measure above the threshold.","Hakuna vigezo vyenye kipimo cha uhusiano kilicho juu ya kizingiti."
|
||||
"and","na"
|
||||
|
|
@ -132,17 +141,23 @@
|
|||
"Create plot","Unda njama"
|
||||
"Coefficients plot","Mchoro wa viambato"
|
||||
"Checks","Hundi"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse observations and apply different data filters.","Hapa chini kuna jedwali la muhtasari kwa ajili ya ufahamu wa haraka, na upande wa kulia unaweza kuibua madarasa ya data, kuvinjari uchunguzi na kutumia vichujio tofauti vya data."
|
||||
"Browse observations","Vinjari uchunguzi"
|
||||
"Settings","Mipangilio"
|
||||
"The following error occured on determining correlations:","Hitilafu ifuatayo ilitokea katika kubaini uhusiano:"
|
||||
"We encountered the following error creating your report:","Tulikutana na hitilafu ifuatayo katika kuunda ripoti yako:"
|
||||
"No missing observations","Hakuna uchunguzi unaokosekana"
|
||||
"There is a total of {p_miss} % missing observations.","Kuna jumla ya uchunguzi wa {p_miss}% unaokosekana."
|
||||
"Median:","Wastani:"
|
||||
"Restore original data","Rejesha data asili"
|
||||
"Reset to original imported dataset. Careful! There is no un-doing.","Rudisha kwenye seti ya data asili iliyoingizwa. Kuwa mwangalifu! Hakuna kutengua."
|
||||
"Characteristics","Sifa"
|
||||
"Only factor/categorical variables are available for stratification. Go back to the 'Prepare' tab to reclass a variable if it's not on the list.","Vigezo vya vipengele/kategoria pekee ndivyo vinavyopatikana kwa ajili ya uainishaji wa tabaka. Rudi kwenye kichupo cha 'Tayarisha' ili kupanga upya kigezo ikiwa hakipo kwenye orodha."
|
||||
"Compare strata?","Linganisha tabaka?"
|
||||
"Correlations","Uhusiano"
|
||||
"To avoid evaluating the correlation of the outcome variable, this can be excluded from the plot or select 'none'.","Ili kuepuka kutathmini uhusiano wa kigezo cha matokeo, hii inaweza kutengwa kwenye njama au kuchagua 'hakuna'."
|
||||
"Correlation cut-off","Kikomo cha uhusiano"
|
||||
"Set the cut-off for considered 'highly correlated'.","Weka kikomo cha 'kinachohusiana sana'."
|
||||
"Missings","Hazipo"
|
||||
"Class","Darasa"
|
||||
"Observations","Uchunguzi"
|
||||
|
|
@ -152,9 +167,11 @@
|
|||
"Confirm","Thibitisha"
|
||||
"The filtered data","Data iliyochujwa"
|
||||
"Create new factor","Unda kipengele kipya"
|
||||
"This window is aimed at advanced users and require some *R*-experience!","Dirisha hili linalenga watumiaji wa hali ya juu na linahitaji uzoefu wa *R*!"
|
||||
"Create new variables","Unda vigezo vipya"
|
||||
"Select data types to include","Chagua aina za data za kujumuisha"
|
||||
"Uploaded data overview","Muhtasari wa data iliyopakiwa"
|
||||
"Here is an overview of how your data is interpreted, and where data is missing. Use this information to consider if data is missing at random or if some observations are missing systematically wich may be caused by an observation bias.","Hapa kuna muhtasari wa jinsi data yako inavyotafsiriwa, na mahali ambapo data inakosekana. Tumia taarifa hii kuzingatia ikiwa data inakosekana bila mpangilio au ikiwa baadhi ya uchunguzi unakosekana kimfumo ambao unaweza kusababishwa na upendeleo wa uchunguzi."
|
||||
"Specify covariables","Bainisha vigeu vinavyoweza kuunganishwa"
|
||||
"If none are selected, all are included.","Ikiwa hakuna aliyechaguliwa, wote wamejumuishwa."
|
||||
"Analyse","Changanua"
|
||||
|
|
@ -192,6 +209,7 @@
|
|||
"List of datasets...","Orodha ya seti za data..."
|
||||
"No data selected!","Hakuna data iliyochaguliwa!"
|
||||
"No dataset here...","Hakuna seti ya data hapa..."
|
||||
"Use a dataset from your environment or from the environment of a package.","Tumia seti ya data kutoka kwa mazingira yako au kutoka kwa mazingira ya kifurushi."
|
||||
"Not a data.frame","Sio data.frame"
|
||||
"Select source","Chagua chanzo"
|
||||
"Select a data source:","Chagua chanzo cha data:"
|
||||
|
|
@ -211,6 +229,7 @@
|
|||
"Multivariable regression model checks","Ukaguzi wa modeli ya urejeshaji unaoweza kubadilika-badilika"
|
||||
"Grouped by {get_label(data,ter)}","Imepangwa kwa makundi kulingana na {get_label(data,ter)}"
|
||||
"Option to perform statistical comparisons between strata in baseline table.","Chaguo la kufanya ulinganisho wa takwimu kati ya tabaka katika jedwali la msingi."
|
||||
"Press 'Evaluate' to create the comparison table.","Bonyeza 'Tathmini' ili kuunda jedwali la kulinganisha."
|
||||
"The data includes {n_col} variables. Please limit to 100.","Data inajumuisha vigezo vya {n_col}. Tafadhali punguza hadi 100."
|
||||
"Data import","Uingizaji wa data"
|
||||
"Data import formatting","Uumbizaji wa kuingiza data"
|
||||
|
|
@ -242,6 +261,7 @@
|
|||
"By specified numbers","Kwa nambari zilizoainishwa"
|
||||
"By quantiles (groups of equal size)","Kwa quantiles (vikundi vya ukubwa sawa)"
|
||||
"Please fill in web address and API token, then press 'Connect'.","Tafadhali jaza anwani ya wavuti na tokeni ya API, kisha bonyeza 'Unganisha'."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from an existing variable or new variables with R code. At the bottom you can restore the original data.","Kuna chaguo za hali ya juu zaidi za kurekebisha vigezo vya vipengele/kategoria pamoja na kuunda kipengele kipya kutoka kwa kigezo kilichopo au vigezo vipya vyenye msimbo wa R. Chini unaweza kurejesha data asili."
|
||||
"Text or character to split string by","Maandishi au herufi ya kugawanya mfuatano kwa"
|
||||
"Split the variable","Gawanya kigezo"
|
||||
"Variable to split:","Kinachoweza kubadilika hadi kugawanyika:"
|
||||
|
|
@ -256,6 +276,7 @@
|
|||
"Original data","Data asili"
|
||||
"Preview of result","Hakikisho la matokeo"
|
||||
"No character variables with accepted delimiters detected.","Hakuna vigezo vya herufi vilivyo na vidhibiti vinavyokubalika vilivyogunduliwa."
|
||||
"Split a text column by a recognised delimiter.","Gawanya safu wima ya maandishi kwa kitenga kinachotambulika."
|
||||
"Apply split","Tumia mgawanyiko"
|
||||
"Stacked relative barplot","Kipande cha baruni kilichopangwa kwa mirundiko"
|
||||
"Create relative stacked barplots to show the distribution of categorical levels","Unda viwanja vya baruni vilivyopangwa ili kuonyesha usambazaji wa viwango vya kategoria"
|
||||
|
|
@ -269,10 +290,14 @@
|
|||
"Words","Maneno"
|
||||
"Shorten to first letters","Fupisha herufi za kwanza"
|
||||
"Shorten to first words","Fupisha maneno ya kwanza"
|
||||
"Missings across variables by the variable **'{input$missings_var}'**","Hazipo katika vigezo kwa kigezo **'{input$missings_var}'**"
|
||||
"Missing vs non-missing observations in the variable **'{input$missings_var}'**","Uchunguzi unaokosekana dhidi ya usiokosekana katika kigezo **'{input$missings_var}'**"
|
||||
"Evaluate missingness by either comparing missing values across variables (optionally grouped by af categorical or dichotomous variable) or compare variables grouped by the missing status (missing or not) of an outcome variable. If there is a significant difference i the missingness, this may cause a bias in you data and should be considered carefully interpreting the data and analyses as data may not be missing at random.","Tathmini upungufu kwa kulinganisha thamani zinazokosekana katika vigezo (hiari zilizopangwa kwa mujibu wa kigezo cha kategoria au cha pande mbili) au linganisha vigezo vilivyopangwa kwa mujibu wa hali inayokosekana (inayokosekana au isiyokosekana) ya kigezo cha matokeo. Ikiwa kuna tofauti kubwa katika upungufu, hii inaweza kusababisha upendeleo katika data yako na inapaswa kuzingatiwa kwa uangalifu kutafsiri data na uchambuzi kwani data inaweza isikosekane bila mpangilio."
|
||||
"Calculating. Hold tight for a moment..","Kuhesabu. Shikilia kwa muda.."
|
||||
"Overview of missing observations","Muhtasari wa uchunguzi uliokosekana"
|
||||
"Analysis method for missingness overview","Mbinu ya uchambuzi wa muhtasari wa kukosekana"
|
||||
"Overview of missings across variables","Muhtasari wa mambo yanayokosekana katika vigezo"
|
||||
"Overview of difference in variables by missing status in outcome","Muhtasari wa tofauti katika vigezo kwa kukosa hali katika matokeo"
|
||||
"Select a variable for grouped overview","Chagua kigezo cha muhtasari wa kikundi"
|
||||
"Select outcome variable for overview","Chagua kigezo cha matokeo kwa muhtasari"
|
||||
"No outcome measure chosen","Hakuna kipimo cha matokeo kilichochaguliwa"
|
||||
|
|
@ -316,14 +341,3 @@
|
|||
"Reorder factor levels","Reorder factor levels"
|
||||
"Modify factor levels","Modify factor levels"
|
||||
"Reorder or rename the levels of factor/categorical variables.","Reorder or rename the levels of factor/categorical variables."
|
||||
"Maximum number of observations:","Maximum number of observations:"
|
||||
"setting to 0 includes all","setting to 0 includes all"
|
||||
"Select a dataset from your environment or sample dataset from a package.","Select a dataset from your environment or sample dataset from a package."
|
||||
"Select a sample dataset from a package.","Select a sample dataset from a package."
|
||||
"Data ready to be imported!","Data ready to be imported!"
|
||||
"Data has %s obs. of %s variables.","Data has %s obs. of %s variables."
|
||||
"Data successfully imported!","Data successfully imported!"
|
||||
"Click to see data","Click to see data"
|
||||
"No data present.","No data present."
|
||||
"You have provided a complete dataset with no missing values.","You have provided a complete dataset with no missing values."
|
||||
"Start by loading data.","Start by loading data."
|
||||
|
|
|
|||
|
|
|
@ -1,19 +0,0 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/import_globalenv-ext.R
|
||||
\name{get_dimensions}
|
||||
\alias{get_dimensions}
|
||||
\title{Extension of the helper function from datamods}
|
||||
\usage{
|
||||
get_dimensions(objs, filter_df = TRUE)
|
||||
}
|
||||
\arguments{
|
||||
\item{objs}{objs}
|
||||
|
||||
\item{filter_df}{flag to only include data frames}
|
||||
}
|
||||
\value{
|
||||
vector of data frames with the package names as attr
|
||||
}
|
||||
\description{
|
||||
Extension of the helper function from datamods
|
||||
}
|
||||
|
|
@ -12,10 +12,7 @@ import_file_ui(
|
|||
preview_data = TRUE,
|
||||
file_extensions = c(".csv", ".txt", ".xls", ".xlsx", ".rds", ".fst", ".sas7bdat",
|
||||
".sav"),
|
||||
layout_params = c("dropdown", "inline"),
|
||||
limit_default = 10000,
|
||||
limit_upper = 10000,
|
||||
limit_lower = 0
|
||||
layout_params = c("dropdown", "inline")
|
||||
)
|
||||
|
||||
import_file_server(
|
||||
|
|
@ -24,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{
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ import_globalenv_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),
|
||||
limit_data = NULL
|
||||
reset = reactive(NULL)
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
|
|
@ -44,8 +43,6 @@ use \code{NULL} for no title or a \code{shiny.tag} for a custom one.}
|
|||
\item{return_class}{Class of returned data: \code{data.frame}, \code{data.table}, \code{tbl_df} (tibble) or \code{raw}.}
|
||||
|
||||
\item{reset}{A \code{reactive} function that when triggered resets the data.}
|
||||
|
||||
\item{limit_data}{upper limit to imported data}
|
||||
}
|
||||
\description{
|
||||
Let the user select a dataset from its own environment or from a package's environment.
|
||||
|
|
|
|||
|
|
@ -4,25 +4,10 @@
|
|||
\alias{launch_FreesearchR}
|
||||
\title{Easily launch the FreesearchR app}
|
||||
\usage{
|
||||
launch_FreesearchR(
|
||||
inlcude_globalenv = TRUE,
|
||||
data_limit_default = 1000,
|
||||
data_limit_upper = 1e+05,
|
||||
data_limit_lower = 1,
|
||||
...
|
||||
)
|
||||
launch_FreesearchR(...)
|
||||
}
|
||||
\arguments{
|
||||
\item{data_limit_default}{default data set observations limit}
|
||||
|
||||
\item{data_limit_upper}{data set observations upper limit}
|
||||
|
||||
\item{data_limit_lower}{data set observations lower limit}
|
||||
|
||||
\item{...}{passed on to \code{shiny::runApp()}}
|
||||
|
||||
\item{include_globalenv}{flag to include global env (local data) as option
|
||||
when loading data}
|
||||
}
|
||||
\value{
|
||||
shiny app
|
||||
|
|
|
|||
|
|
@ -18,10 +18,9 @@ data.frame
|
|||
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.
|
||||
If limit is set to 0 or NULL, the original data set is returned.
|
||||
}
|
||||
\examples{
|
||||
prod(dim(mtcars))
|
||||
limit_data_size(mtcars,2)
|
||||
limit_data_size(mtcars)
|
||||
limit_data_size(mtcars,100)
|
||||
}
|
||||
|
|
|
|||
538
renv.lock
538
renv.lock
File diff suppressed because one or more lines are too long
101
renv/activate.R
101
renv/activate.R
|
|
@ -2,8 +2,7 @@
|
|||
local({
|
||||
|
||||
# the requested version of renv
|
||||
version <- "1.1.7"
|
||||
attr(version, "md5") <- "dd5d60f155dadff4c88c2fc6680504b4"
|
||||
version <- "1.1.5"
|
||||
attr(version, "sha") <- NULL
|
||||
|
||||
# the project directory
|
||||
|
|
@ -169,16 +168,6 @@ local({
|
|||
if (quiet)
|
||||
return(invisible())
|
||||
|
||||
# also check for config environment variables that should suppress messages
|
||||
# https://github.com/rstudio/renv/issues/2214
|
||||
enabled <- Sys.getenv("RENV_CONFIG_STARTUP_QUIET", unset = NA)
|
||||
if (!is.na(enabled) && tolower(enabled) %in% c("true", "1"))
|
||||
return(invisible())
|
||||
|
||||
enabled <- Sys.getenv("RENV_CONFIG_SYNCHRONIZED_CHECK", unset = NA)
|
||||
if (!is.na(enabled) && tolower(enabled) %in% c("false", "0"))
|
||||
return(invisible())
|
||||
|
||||
msg <- sprintf(fmt, ...)
|
||||
cat(msg, file = stdout(), sep = if (appendLF) "\n" else "")
|
||||
|
||||
|
|
@ -226,16 +215,6 @@ local({
|
|||
section <- header(sprintf("Bootstrapping renv %s", friendly))
|
||||
catf(section)
|
||||
|
||||
# try to install renv from cache
|
||||
md5 <- attr(version, "md5", exact = TRUE)
|
||||
if (length(md5)) {
|
||||
pkgpath <- renv_bootstrap_find(version)
|
||||
if (length(pkgpath) && file.exists(pkgpath)) {
|
||||
file.copy(pkgpath, library, recursive = TRUE)
|
||||
return(invisible())
|
||||
}
|
||||
}
|
||||
|
||||
# attempt to download renv
|
||||
catf("- Downloading renv ... ", appendLF = FALSE)
|
||||
withCallingHandlers(
|
||||
|
|
@ -261,6 +240,7 @@ local({
|
|||
|
||||
# add empty line to break up bootstrapping from normal output
|
||||
catf("")
|
||||
|
||||
return(invisible())
|
||||
}
|
||||
|
||||
|
|
@ -277,20 +257,12 @@ local({
|
|||
repos <- Sys.getenv("RENV_CONFIG_REPOS_OVERRIDE", unset = NA)
|
||||
if (!is.na(repos)) {
|
||||
|
||||
# split on ';' if present
|
||||
parts <- strsplit(repos, ";", fixed = TRUE)[[1L]]
|
||||
# check for RSPM; if set, use a fallback repository for renv
|
||||
rspm <- Sys.getenv("RSPM", unset = NA)
|
||||
if (identical(rspm, repos))
|
||||
repos <- c(RSPM = rspm, CRAN = cran)
|
||||
|
||||
# split into named repositories if present
|
||||
idx <- regexpr("=", parts, fixed = TRUE)
|
||||
keys <- substring(parts, 1L, idx - 1L)
|
||||
vals <- substring(parts, idx + 1L)
|
||||
names(vals) <- keys
|
||||
|
||||
# if we have a single unnamed repository, call it CRAN
|
||||
if (length(vals) == 1L && identical(keys, ""))
|
||||
names(vals) <- "CRAN"
|
||||
|
||||
return(vals)
|
||||
return(repos)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -539,51 +511,6 @@ local({
|
|||
|
||||
}
|
||||
|
||||
renv_bootstrap_find <- function(version) {
|
||||
|
||||
path <- renv_bootstrap_find_cache(version)
|
||||
if (length(path) && file.exists(path)) {
|
||||
catf("- Using renv %s from global package cache", version)
|
||||
return(path)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
renv_bootstrap_find_cache <- function(version) {
|
||||
|
||||
md5 <- attr(version, "md5", exact = TRUE)
|
||||
if (is.null(md5))
|
||||
return()
|
||||
|
||||
# infer path to renv cache
|
||||
cache <- Sys.getenv("RENV_PATHS_CACHE", unset = "")
|
||||
if (!nzchar(cache)) {
|
||||
root <- Sys.getenv("RENV_PATHS_ROOT", unset = NA)
|
||||
if (!is.na(root))
|
||||
cache <- file.path(root, "cache")
|
||||
}
|
||||
|
||||
if (!nzchar(cache)) {
|
||||
tools <- asNamespace("tools")
|
||||
if (is.function(tools$R_user_dir)) {
|
||||
root <- tools$R_user_dir("renv", "cache")
|
||||
cache <- file.path(root, "cache")
|
||||
}
|
||||
}
|
||||
|
||||
# start completing path to cache
|
||||
file.path(
|
||||
cache,
|
||||
renv_bootstrap_cache_version(),
|
||||
renv_bootstrap_platform_prefix(),
|
||||
"renv",
|
||||
version,
|
||||
md5,
|
||||
"renv"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
renv_bootstrap_download_tarball <- function(version) {
|
||||
|
||||
# if the user has provided the path to a tarball via
|
||||
|
|
@ -1052,7 +979,7 @@ local({
|
|||
|
||||
renv_bootstrap_validate_version_release <- function(version, description) {
|
||||
expected <- description[["Version"]]
|
||||
is.character(expected) && identical(c(expected), c(version))
|
||||
is.character(expected) && identical(expected, version)
|
||||
}
|
||||
|
||||
renv_bootstrap_hash_text <- function(text) {
|
||||
|
|
@ -1254,18 +1181,6 @@ local({
|
|||
|
||||
}
|
||||
|
||||
renv_bootstrap_cache_version <- function() {
|
||||
# NOTE: users should normally not override the cache version;
|
||||
# this is provided just to make testing easier
|
||||
Sys.getenv("RENV_CACHE_VERSION", unset = "v5")
|
||||
}
|
||||
|
||||
renv_bootstrap_cache_version_previous <- function() {
|
||||
version <- renv_bootstrap_cache_version()
|
||||
number <- as.integer(substring(version, 2L))
|
||||
paste("v", number - 1L, sep = "")
|
||||
}
|
||||
|
||||
renv_json_read <- function(file = NULL, text = NULL) {
|
||||
|
||||
jlerr <- NULL
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
"ppm.enabled": null,
|
||||
"ppm.ignored.urls": [],
|
||||
"r.version": null,
|
||||
"snapshot.dev": false,
|
||||
"snapshot.type": "explicit",
|
||||
"use.cache": true,
|
||||
"vcs.ignore.cellar": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue