mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 18:09: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
|
||||
|
||||
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_var,
|
||||
n_complete,
|
||||
|
|
|
@ -118,8 +118,8 @@ update_variables_server <- function(id,
|
|||
|
||||
output$data_info <- shiny::renderUI({
|
||||
shiny::req(data_r())
|
||||
data <- data_r()
|
||||
sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||
data_description(data_r())
|
||||
# sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||
})
|
||||
|
||||
variables_r <- shiny::reactive({
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#### 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
|
||||
|
||||
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_var,
|
||||
n_complete,
|
||||
|
@ -6911,8 +6911,8 @@ update_variables_server <- function(id,
|
|||
|
||||
output$data_info <- shiny::renderUI({
|
||||
shiny::req(data_r())
|
||||
data <- data_r()
|
||||
sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||
data_description(data_r())
|
||||
# sprintf(i18n("Data has %s observations and %s variables."), nrow(data), ncol(data))
|
||||
})
|
||||
|
||||
variables_r <- shiny::reactive({
|
||||
|
@ -7952,36 +7952,20 @@ ui_elements <- list(
|
|||
fluidRow(
|
||||
shiny::column(
|
||||
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"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
shiny::column(
|
||||
width = 2
|
||||
),
|
||||
shiny::column(
|
||||
width = 8,
|
||||
tags$h4("Advanced data manipulation"),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
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(),
|
||||
width = 4,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_update",
|
||||
label = "Reorder factor levels",
|
||||
|
@ -7989,7 +7973,50 @@ ui_elements <- list(
|
|||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
||||
),
|
||||
shiny::column(
|
||||
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(),
|
||||
tags$h4("Compare modified data to original"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$p(
|
||||
"Raw print of the original vs the modified data."
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
shiny::column(
|
||||
width = 6,
|
||||
shiny::tags$b("Original data:"),
|
||||
# verbatimTextOutput("original"),
|
||||
shiny::verbatimTextOutput("original_str")
|
||||
),
|
||||
shiny::column(
|
||||
width = 6,
|
||||
shiny::tags$b("Modified data:"),
|
||||
# verbatimTextOutput("modified"),
|
||||
shiny::verbatimTextOutput("modified_str")
|
||||
)
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::actionButton(
|
||||
inputId = "data_reset",
|
||||
|
@ -7998,69 +8025,7 @@ ui_elements <- list(
|
|||
),
|
||||
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(
|
||||
width = 2
|
||||
)
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
tags$h4("Compare modified data to original"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$p(
|
||||
"Here is a overview of the original vs the modified data."
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
tags$b("Original data:"),
|
||||
# verbatimTextOutput("original"),
|
||||
verbatimTextOutput("original_str")
|
||||
),
|
||||
column(
|
||||
width = 6,
|
||||
tags$b("Modified data:"),
|
||||
# verbatimTextOutput("modified"),
|
||||
verbatimTextOutput("modified_str")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
@ -5,6 +5,6 @@ account: agdamsbo
|
|||
server: shinyapps.io
|
||||
hostUrl: https://api.shinyapps.io/v1
|
||||
appId: 13611288
|
||||
bundleId: 10042980
|
||||
bundleId: 10047791
|
||||
url: https://agdamsbo.shinyapps.io/freesearcheR/
|
||||
version: 1
|
||||
|
|
|
@ -180,36 +180,20 @@ ui_elements <- list(
|
|||
fluidRow(
|
||||
shiny::column(
|
||||
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"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
shiny::column(
|
||||
width = 2
|
||||
),
|
||||
shiny::column(
|
||||
width = 8,
|
||||
tags$h4("Advanced data manipulation"),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
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(),
|
||||
width = 4,
|
||||
shiny::actionButton(
|
||||
inputId = "modal_update",
|
||||
label = "Reorder factor levels",
|
||||
|
@ -217,7 +201,50 @@ ui_elements <- list(
|
|||
),
|
||||
shiny::tags$br(),
|
||||
shiny::helpText("Reorder the levels of factor/categorical variables."),
|
||||
),
|
||||
shiny::column(
|
||||
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(),
|
||||
tags$h4("Compare modified data to original"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$p(
|
||||
"Raw print of the original vs the modified data."
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::fluidRow(
|
||||
shiny::column(
|
||||
width = 6,
|
||||
shiny::tags$b("Original data:"),
|
||||
# verbatimTextOutput("original"),
|
||||
shiny::verbatimTextOutput("original_str")
|
||||
),
|
||||
shiny::column(
|
||||
width = 6,
|
||||
shiny::tags$b("Modified data:"),
|
||||
# verbatimTextOutput("modified"),
|
||||
shiny::verbatimTextOutput("modified_str")
|
||||
)
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::actionButton(
|
||||
inputId = "data_reset",
|
||||
|
@ -226,69 +253,7 @@ ui_elements <- list(
|
|||
),
|
||||
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(
|
||||
width = 2
|
||||
)
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
tags$h4("Compare modified data to original"),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$p(
|
||||
"Here is a overview of the original vs the modified data."
|
||||
),
|
||||
shiny::tags$br(),
|
||||
shiny::tags$br(),
|
||||
fluidRow(
|
||||
column(
|
||||
width = 6,
|
||||
tags$b("Original data:"),
|
||||
# verbatimTextOutput("original"),
|
||||
verbatimTextOutput("original_str")
|
||||
),
|
||||
column(
|
||||
width = 6,
|
||||
tags$b("Modified data:"),
|
||||
# verbatimTextOutput("modified"),
|
||||
verbatimTextOutput("modified_str")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue