mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 01:49:39 +02:00
This commit is contained in:
parent
44d13eda89
commit
013fc19d04
6 changed files with 81 additions and 71 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({
|
||||
|
|
|
@ -3748,16 +3748,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
|
||||
# )
|
||||
}
|
||||
|
||||
|
||||
|
@ -8493,7 +8494,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(
|
||||
|
@ -8529,7 +8530,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(
|
||||
|
@ -8699,7 +8700,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",
|
||||
|
@ -8813,7 +8814,7 @@ ui_elements <- function(selection) {
|
|||
bslib::nav_panel,
|
||||
c(
|
||||
list(
|
||||
title = "Visuals",
|
||||
title = i18n$t("Visuals"),
|
||||
icon = shiny::icon("chart-line"),
|
||||
value = "nav_visuals"
|
||||
),
|
||||
|
@ -8834,7 +8835,7 @@ ui_elements <- function(selection) {
|
|||
##############################################################################
|
||||
"analyze" =
|
||||
bslib::nav_panel(
|
||||
title = "Regression",
|
||||
title = i18n$t("Regression"),
|
||||
icon = shiny::icon("calculator"),
|
||||
value = "nav_analyses",
|
||||
do.call(
|
||||
|
@ -8849,7 +8850,7 @@ ui_elements <- function(selection) {
|
|||
##############################################################################
|
||||
"download" =
|
||||
bslib::nav_panel(
|
||||
title = "Download",
|
||||
title = i18n$t("Download"),
|
||||
icon = shiny::icon("download"),
|
||||
value = "nav_download",
|
||||
shiny::fluidRow(
|
||||
|
@ -9398,7 +9399,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({
|
||||
|
|
|
@ -4,44 +4,44 @@
|
|||
"File upload","Upload fil"
|
||||
"REDCap server export","REDCap server export"
|
||||
"Local or sample data","Lokal eller testdata"
|
||||
"Please be mindfull handling sensitive data","Please be mindfull handling sensitive 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).","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)."
|
||||
"Quick overview","Quick overview"
|
||||
"Select variables for final import","Select variables for final import"
|
||||
"Exclude incomplete variables:","Exclude incomplete variables:"
|
||||
"Manual selection:","Manual selection:"
|
||||
"Let's begin!","Let's begin!"
|
||||
"Analysis validation","Analysis validation"
|
||||
"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:"
|
||||
"Manual selection:","Manuel udvælgelse:"
|
||||
"Let's begin!","Kom i gang!"
|
||||
"Analysis validation","Analysevalidering"
|
||||
"Report","Rapport"
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Choose your favourite output file format for further work, and download, when the analyses are done."
|
||||
"Choose your favourite output file format for further work, and download, when the analyses are done.","Vælge dit foretrukne dataformat, og hent data, når du er ærdig med databehandlingen."
|
||||
"www/intro.html","www/intro_da.html"
|
||||
"<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>","<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>"
|
||||
"Overview and filter","Overview and filter"
|
||||
"Overview and filtering","Overview and filtering"
|
||||
"<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>","<p><em><strong>FreesearchR</strong></em> opbevarer alene data i forbindelse med din analyse, men du bør kun behandle personfølsomme data når du kører <em><strong>FreesearchR</strong></em> direkte på dine egen maskine. <a href='https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine'>Læs mere her</a></p>"
|
||||
"Overview and filter","Overblik og filtre"
|
||||
"Overview and filtering","Overblik og filtrering"
|
||||
"Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse data and apply different data filters.","Below you find a summary table for quick insigths, and on the right you can visualise data classes, browse data and apply different data filters."
|
||||
"Visual overview","Visual overview"
|
||||
"Browse data","Browse data"
|
||||
"Filter data types","Filter data types"
|
||||
"Filter observations","Filter observations"
|
||||
"Apply filter on observation","Apply filter on observation"
|
||||
"Edit and create data","Edit and create data"
|
||||
"Subset, rename and convert variables","Subset, rename and convert variables"
|
||||
"Visual overview","Visuelt overblik"
|
||||
"Browse data","Udforsk data"
|
||||
"Filter data types","Filtrer datatyper"
|
||||
"Filter observations","Filtrer observationer"
|
||||
"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.).","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.)."
|
||||
"There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data.","There are more advanced options to modify factor/categorical variables as well as create new factor from a continous variable or new variables with R code. At the bottom you can restore the original data."
|
||||
"Please note that data modifications are applied before any filtering.","Please note that data modifications are applied before any filtering."
|
||||
"Advanced data manipulation","Advanced data manipulation"
|
||||
"Advanced data manipulation","Avanceret datamanipulation"
|
||||
"Below options allow more advanced varaible manipulations.","Below options allow more advanced varaible manipulations."
|
||||
"Reorder factor levels","Reorder factor levels"
|
||||
"Reorder factor levels","Arranger niveuer i faktor"
|
||||
"Reorder the levels of factor/categorical variables.","Reorder the levels of factor/categorical variables."
|
||||
"New factor","New factor"
|
||||
"New factor","Ny faktor"
|
||||
"Create factor/categorical variable from a continous variable (number/date/time).","Create factor/categorical variable from a continous variable (number/date/time)."
|
||||
"New variable","New variable"
|
||||
"New variable","Ny variabel"
|
||||
"Create a new variable based on an R-expression.","Create a new variable based on an R-expression."
|
||||
"Compare modified data to original","Compare modified data to original"
|
||||
"Raw print of the original vs the modified data.","Raw print of the original vs the modified data."
|
||||
"Original data:","Original data:"
|
||||
"Modified data:","Modified data:"
|
||||
"New column name:","New column name:"
|
||||
"Modified data:","Ændret data:"
|
||||
"New column name:","Navn til ny variabel:"
|
||||
"Group calculation by:","Group calculation by:"
|
||||
"Enter an expression to define new column:","Enter an expression to define new column:"
|
||||
"Click on a column name to add it to the expression:","Click on a column name to add it to the expression:"
|
||||
|
@ -84,22 +84,27 @@
|
|||
"Count","Antal"
|
||||
"Update levels of a factor","Updater niveauerne for en faktor"
|
||||
"Update & select variables","Update & select variables"
|
||||
"Date format:","Date format:"
|
||||
"Date format:","Datoformat:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"Data has %s observations and %s variables.","Data has %s observations and %s variables."
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"Only include variables missing less observations than the specified percentage. At 0, only complete variables are included; at 100, all variables are included.","Only include variables missing less observations than the specified percentage. At 0, only complete variables are included; at 100, all variables are included."
|
||||
"No data to display.","Ingen data at vise."
|
||||
"Data successfully updated!","Data er opdateret!"
|
||||
"You removed {p_out} % of observations.","Du har fjernet {p_out} % af observationerne."
|
||||
"You removed {p_out} % of variables.","Du har fjernet {p_out} % af variablerne."
|
||||
"You can import {file_extensions_text} files","Du kan vælge mellem disse filtyper: {file_extensions_text}."
|
||||
"You can choose between these file types:","Du kan vælge mellem følgene filtyper:"
|
||||
"Rows to skip before reading data:","Rows to skip before reading data:"
|
||||
"Missing values character(s):","Missing values character(s):"
|
||||
"Rows to skip before reading data:","Rækker der skal springes over:"
|
||||
"Missing values character(s):","Tegn for manglende værdier:"
|
||||
"if several use a comma (',') to separate them","if several use a comma (',') to separate them"
|
||||
"Encoding:","Encoding:"
|
||||
"Upload a file:","Upload a file:"
|
||||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"Encoding:","Kodning:"
|
||||
"Upload a file:","Upload en fil:"
|
||||
"Browse...","Vælg..."
|
||||
"Select sheet to import:","Vælg ark:"
|
||||
"No file selected.","Ingen fil valgt."
|
||||
"Evaluate","Evaluer"
|
||||
"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.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
|
|
|
|
@ -87,10 +87,8 @@
|
|||
"Date format:","Date format:"
|
||||
"Date to use as origin to convert date/datetime:","Date to use as origin to convert date/datetime:"
|
||||
"Apply changes","Apply changes"
|
||||
"Data has %s observations and %s variables.","Data has %s observations and %s variables."
|
||||
"No data to display.","No data to display."
|
||||
"Data successfully updated!","Data successfully updated!"
|
||||
"Only include variables missing less observations than the specified percentage. At 0, only complete variables are included; at 100, all variables are included.","Only include variables missing less observations than the specified percentage. At 0, only complete variables are included; at 100, all variables are included."
|
||||
"You removed {p_out} % of observations.","You removed {p_out} % of observations."
|
||||
"You removed {p_out} % of variables.","You removed {p_out} % of variables."
|
||||
"You can import {file_extensions_text} files","You can import {file_extensions_text} files"
|
||||
|
@ -103,3 +101,10 @@
|
|||
"Browse...","Browse..."
|
||||
"Select sheet to import:","Select sheet to import:"
|
||||
"No file selected.","No file selected."
|
||||
"Evaluate","Evaluate"
|
||||
"Visuals","Visuals"
|
||||
"Regression","Regression"
|
||||
"Download","Download"
|
||||
"{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases.","{data_text} has {n} observations and {n_var} variables, with {n_complete} ({p_complete} %) complete cases."
|
||||
"Prepare","Prepare"
|
||||
"At 0, only complete variables are included; at 100, all variables are included.","At 0, only complete variables are included; at 100, all variables are included."
|
||||
|
|
|
Loading…
Add table
Reference in a new issue