mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
This commit is contained in:
parent
44d13eda89
commit
013fc19d04
6 changed files with 83 additions and 73 deletions
19
R/helpers.R
19
R/helpers.R
|
|
@ -361,16 +361,17 @@ data_description <- function(data, data_text = "Data") {
|
|||
n <- nrow(data)
|
||||
n_var <- ncol(data)
|
||||
n_complete <- sum(complete.cases(data))
|
||||
p_complete <- n_complete / n
|
||||
p_complete <- signif(100 * n_complete / n, 3)
|
||||
|
||||
sprintf(
|
||||
"%s has %s observations and %s variables, with %s (%s%%) complete cases.",
|
||||
data_text,
|
||||
n,
|
||||
n_var,
|
||||
n_complete,
|
||||
signif(100 * p_complete, 3)
|
||||
)
|
||||
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,
|
||||
# n,
|
||||
# n_var,
|
||||
# n_complete,
|
||||
# p_complete
|
||||
# )
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ ui_elements <- function(selection) {
|
|||
format = shinyWidgets::wNumbFormat(decimals = 0),
|
||||
color = datamods:::get_primary_color()
|
||||
),
|
||||
shiny::helpText(i18n$t("Only include variables missing less observations than the specified percentage. 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(
|
||||
|
|
@ -167,7 +167,7 @@ ui_elements <- function(selection) {
|
|||
#########
|
||||
##############################################################################
|
||||
"prepare" = bslib::nav_menu(
|
||||
title = "Prepare",
|
||||
title = i18n$t("Prepare"),
|
||||
icon = shiny::icon("pen-to-square"),
|
||||
value = "nav_prepare",
|
||||
bslib::nav_panel(
|
||||
|
|
@ -337,7 +337,7 @@ ui_elements <- function(selection) {
|
|||
##############################################################################
|
||||
"describe" =
|
||||
bslib::nav_menu(
|
||||
title = "Evaluate",
|
||||
title = i18n$t("Evaluate"),
|
||||
icon = shiny::icon("magnifying-glass-chart"),
|
||||
value = "nav_describe",
|
||||
# id = "navdescribe",
|
||||
|
|
@ -451,7 +451,7 @@ ui_elements <- function(selection) {
|
|||
bslib::nav_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Visuals",
|
||||
title = i18n$t("Visuals"),
|
||||
icon = shiny::icon("chart-line"),
|
||||
value = "nav_visuals"
|
||||
),
|
||||
|
|
@ -472,7 +472,7 @@ ui_elements <- function(selection) {
|
|||
##############################################################################
|
||||
"analyze" =
|
||||
bslib::nav_panel(
|
||||
title = "Regression",
|
||||
title = i18n$t("Regression"),
|
||||
icon = shiny::icon("calculator"),
|
||||
value = "nav_analyses",
|
||||
do.call(
|
||||
|
|
@ -487,7 +487,7 @@ ui_elements <- function(selection) {
|
|||
##############################################################################
|
||||
"download" =
|
||||
bslib::nav_panel(
|
||||
title = "Download",
|
||||
title = i18n$t("Download"),
|
||||
icon = shiny::icon("download"),
|
||||
value = "nav_download",
|
||||
shiny::fluidRow(
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ update_variables_server <- function(id,
|
|||
output$data_info <- shiny::renderUI({
|
||||
shiny::req(data_r())
|
||||
data_description(data_r())
|
||||
# sprintf(i18n$t("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||
})
|
||||
|
||||
variables_r <- shiny::reactive({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue