mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 09:59:39 +02:00
ui on modify pane
This commit is contained in:
parent
e3ac3bc66e
commit
3e49868ff4
6 changed files with 109 additions and 179 deletions
|
@ -1 +1 @@
|
||||||
app_version <- function()'250402_1131'
|
app_version <- function()'250403_0630'
|
||||||
|
|
|
@ -335,7 +335,7 @@ data_description <- function(data) {
|
||||||
p_complete <- n_complete/n
|
p_complete <- n_complete/n
|
||||||
|
|
||||||
sprintf(
|
sprintf(
|
||||||
i18n("Data has %s observations and %s variables, with %s (%s%%) complete cases"),
|
i18n("Data has %s observations and %s variables, with %s (%s%%) complete cases."),
|
||||||
n,
|
n,
|
||||||
n_var,
|
n_var,
|
||||||
n_complete,
|
n_complete,
|
||||||
|
|
|
@ -118,8 +118,8 @@ update_variables_server <- function(id,
|
||||||
|
|
||||||
output$data_info <- shiny::renderUI({
|
output$data_info <- shiny::renderUI({
|
||||||
shiny::req(data_r())
|
shiny::req(data_r())
|
||||||
data <- data_r()
|
data_description(data_r())
|
||||||
sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
# sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||||
})
|
})
|
||||||
|
|
||||||
variables_r <- shiny::reactive({
|
variables_r <- shiny::reactive({
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
|
#### Current file: /Users/au301842/FreesearchR/R//app_version.R
|
||||||
########
|
########
|
||||||
|
|
||||||
app_version <- function()'250402_1131'
|
app_version <- function()'250403_0630'
|
||||||
|
|
||||||
|
|
||||||
########
|
########
|
||||||
|
@ -2808,7 +2808,7 @@ data_description <- function(data) {
|
||||||
p_complete <- n_complete/n
|
p_complete <- n_complete/n
|
||||||
|
|
||||||
sprintf(
|
sprintf(
|
||||||
i18n("Data has %s observations and %s variables, with %s (%s%%) complete cases"),
|
i18n("Data has %s observations and %s variables, with %s (%s%%) complete cases."),
|
||||||
n,
|
n,
|
||||||
n_var,
|
n_var,
|
||||||
n_complete,
|
n_complete,
|
||||||
|
@ -6911,8 +6911,8 @@ update_variables_server <- function(id,
|
||||||
|
|
||||||
output$data_info <- shiny::renderUI({
|
output$data_info <- shiny::renderUI({
|
||||||
shiny::req(data_r())
|
shiny::req(data_r())
|
||||||
data <- data_r()
|
data_description(data_r())
|
||||||
sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
# sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||||
})
|
})
|
||||||
|
|
||||||
variables_r <- shiny::reactive({
|
variables_r <- shiny::reactive({
|
||||||
|
@ -7952,90 +7952,47 @@ ui_elements <- list(
|
||||||
fluidRow(
|
fluidRow(
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 9,
|
width = 9,
|
||||||
shiny::tags$p(shiny::markdown("Below, are several options to update variables (rename, set new labels (for nicer tables in the report) and change variable classes (numeric, factor/categorical etc.).), modify factor/categorical variables as well as create new factor from a continous variable or new variables with *R* code."))
|
shiny::tags$p(shiny::markdown("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.)."),
|
||||||
|
shiny::tags$p("There are also 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."))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
# shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
|
||||||
update_variables_ui("modal_variables"),
|
update_variables_ui("modal_variables"),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
fluidRow(
|
tags$h4("Advanced data manipulation"),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::fluidRow(
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 2
|
width = 4,
|
||||||
),
|
shiny::actionButton(
|
||||||
shiny::column(
|
inputId = "modal_update",
|
||||||
width = 8,
|
label = "Reorder factor levels",
|
||||||
tags$h4("Advanced data manipulation"),
|
width = "100%"
|
||||||
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
fluidRow(
|
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
||||||
shiny::column(
|
|
||||||
width = 6,
|
|
||||||
# tags$h4("Update or modify variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::actionButton(
|
|
||||||
# inputId = "modal_variables",
|
|
||||||
# label = "Subset, rename and change class/type",
|
|
||||||
# width = "100%"
|
|
||||||
# ),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::helpText("Subset variables, rename variables and labels, and apply new class to variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_update",
|
|
||||||
label = "Reorder factor levels",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "data_reset",
|
|
||||||
label = "Restore original data",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br()
|
|
||||||
),
|
|
||||||
shiny::column(
|
|
||||||
width = 6,
|
|
||||||
# tags$h4("Create new variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_cut",
|
|
||||||
label = "New factor",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Create factor/categorical variable from a continous variable (number/date/time)."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_column",
|
|
||||||
label = "New variable",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText(shiny::markdown("Create a new variable/column based on an *R*-expression.")),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br()
|
|
||||||
)
|
|
||||||
) # ,
|
|
||||||
# tags$h4("Restore"),
|
|
||||||
# shiny::actionButton(
|
|
||||||
# inputId = "data_reset",
|
|
||||||
# label = "Restore original data",
|
|
||||||
# width = "100%"
|
|
||||||
# ),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing.")
|
|
||||||
),
|
),
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 2
|
width = 4,
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "modal_cut",
|
||||||
|
label = "New factor",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText("Create factor/categorical variable from a continous variable (number/date/time).")
|
||||||
|
),
|
||||||
|
shiny::column(
|
||||||
|
width = 4,
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "modal_column",
|
||||||
|
label = "New variable",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText(shiny::markdown("Create a new variable/column based on an *R*-expression."))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
|
@ -8043,24 +8000,32 @@ ui_elements <- list(
|
||||||
tags$h4("Compare modified data to original"),
|
tags$h4("Compare modified data to original"),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$p(
|
shiny::tags$p(
|
||||||
"Here is a overview of the original vs the modified data."
|
"Raw print of the original vs the modified data."
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
shiny::fluidRow(
|
||||||
fluidRow(
|
shiny::column(
|
||||||
column(
|
|
||||||
width = 6,
|
width = 6,
|
||||||
tags$b("Original data:"),
|
shiny::tags$b("Original data:"),
|
||||||
# verbatimTextOutput("original"),
|
# verbatimTextOutput("original"),
|
||||||
verbatimTextOutput("original_str")
|
shiny::verbatimTextOutput("original_str")
|
||||||
),
|
),
|
||||||
column(
|
shiny::column(
|
||||||
width = 6,
|
width = 6,
|
||||||
tags$b("Modified data:"),
|
shiny::tags$b("Modified data:"),
|
||||||
# verbatimTextOutput("modified"),
|
# verbatimTextOutput("modified"),
|
||||||
verbatimTextOutput("modified_str")
|
shiny::verbatimTextOutput("modified_str")
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "data_reset",
|
||||||
|
label = "Restore original data",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing."),
|
||||||
|
shiny::tags$br()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
|
@ -5,6 +5,6 @@ account: agdamsbo
|
||||||
server: shinyapps.io
|
server: shinyapps.io
|
||||||
hostUrl: https://api.shinyapps.io/v1
|
hostUrl: https://api.shinyapps.io/v1
|
||||||
appId: 13611288
|
appId: 13611288
|
||||||
bundleId: 10042980
|
bundleId: 10047791
|
||||||
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
||||||
version: 1
|
version: 1
|
||||||
|
|
|
@ -180,90 +180,47 @@ ui_elements <- list(
|
||||||
fluidRow(
|
fluidRow(
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 9,
|
width = 9,
|
||||||
shiny::tags$p(shiny::markdown("Below, are several options to update variables (rename, set new labels (for nicer tables in the report) and change variable classes (numeric, factor/categorical etc.).), modify factor/categorical variables as well as create new factor from a continous variable or new variables with *R* code."))
|
shiny::tags$p(shiny::markdown("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.)."),
|
||||||
|
shiny::tags$p("There are also 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."))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
# shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
|
||||||
update_variables_ui("modal_variables"),
|
update_variables_ui("modal_variables"),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
fluidRow(
|
tags$h4("Advanced data manipulation"),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::fluidRow(
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 2
|
width = 4,
|
||||||
),
|
shiny::actionButton(
|
||||||
shiny::column(
|
inputId = "modal_update",
|
||||||
width = 8,
|
label = "Reorder factor levels",
|
||||||
tags$h4("Advanced data manipulation"),
|
width = "100%"
|
||||||
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
fluidRow(
|
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
||||||
shiny::column(
|
|
||||||
width = 6,
|
|
||||||
# tags$h4("Update or modify variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::actionButton(
|
|
||||||
# inputId = "modal_variables",
|
|
||||||
# label = "Subset, rename and change class/type",
|
|
||||||
# width = "100%"
|
|
||||||
# ),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::helpText("Subset variables, rename variables and labels, and apply new class to variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_update",
|
|
||||||
label = "Reorder factor levels",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "data_reset",
|
|
||||||
label = "Restore original data",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br()
|
|
||||||
),
|
|
||||||
shiny::column(
|
|
||||||
width = 6,
|
|
||||||
# tags$h4("Create new variables"),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_cut",
|
|
||||||
label = "New factor",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText("Create factor/categorical variable from a continous variable (number/date/time)."),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::actionButton(
|
|
||||||
inputId = "modal_column",
|
|
||||||
label = "New variable",
|
|
||||||
width = "100%"
|
|
||||||
),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::helpText(shiny::markdown("Create a new variable/column based on an *R*-expression.")),
|
|
||||||
shiny::tags$br(),
|
|
||||||
shiny::tags$br()
|
|
||||||
)
|
|
||||||
) # ,
|
|
||||||
# tags$h4("Restore"),
|
|
||||||
# shiny::actionButton(
|
|
||||||
# inputId = "data_reset",
|
|
||||||
# label = "Restore original data",
|
|
||||||
# width = "100%"
|
|
||||||
# ),
|
|
||||||
# shiny::tags$br(),
|
|
||||||
# shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing.")
|
|
||||||
),
|
),
|
||||||
shiny::column(
|
shiny::column(
|
||||||
width = 2
|
width = 4,
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "modal_cut",
|
||||||
|
label = "New factor",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText("Create factor/categorical variable from a continous variable (number/date/time).")
|
||||||
|
),
|
||||||
|
shiny::column(
|
||||||
|
width = 4,
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "modal_column",
|
||||||
|
label = "New variable",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText(shiny::markdown("Create a new variable/column based on an *R*-expression."))
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
|
@ -271,24 +228,32 @@ ui_elements <- list(
|
||||||
tags$h4("Compare modified data to original"),
|
tags$h4("Compare modified data to original"),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$p(
|
shiny::tags$p(
|
||||||
"Here is a overview of the original vs the modified data."
|
"Raw print of the original vs the modified data."
|
||||||
),
|
),
|
||||||
shiny::tags$br(),
|
shiny::tags$br(),
|
||||||
shiny::tags$br(),
|
shiny::fluidRow(
|
||||||
fluidRow(
|
shiny::column(
|
||||||
column(
|
|
||||||
width = 6,
|
width = 6,
|
||||||
tags$b("Original data:"),
|
shiny::tags$b("Original data:"),
|
||||||
# verbatimTextOutput("original"),
|
# verbatimTextOutput("original"),
|
||||||
verbatimTextOutput("original_str")
|
shiny::verbatimTextOutput("original_str")
|
||||||
),
|
),
|
||||||
column(
|
shiny::column(
|
||||||
width = 6,
|
width = 6,
|
||||||
tags$b("Modified data:"),
|
shiny::tags$b("Modified data:"),
|
||||||
# verbatimTextOutput("modified"),
|
# verbatimTextOutput("modified"),
|
||||||
verbatimTextOutput("modified_str")
|
shiny::verbatimTextOutput("modified_str")
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::actionButton(
|
||||||
|
inputId = "data_reset",
|
||||||
|
label = "Restore original data",
|
||||||
|
width = "100%"
|
||||||
|
),
|
||||||
|
shiny::tags$br(),
|
||||||
|
shiny::helpText("Reset to original imported dataset. Careful! There is no un-doing."),
|
||||||
|
shiny::tags$br()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue