mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-12-16 09:32:10 +01:00
feat: Frequncy column added to new factor overview
This commit is contained in:
parent
61ca275690
commit
59cefc55a3
1 changed files with 3 additions and 7 deletions
|
|
@ -214,13 +214,6 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
||||||
|
|
||||||
choices <- unique(choices)
|
choices <- unique(choices)
|
||||||
|
|
||||||
## Implement labeled vector selection of cut methods to include descriptions
|
|
||||||
##
|
|
||||||
## cut_methods()
|
|
||||||
##
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vectorSelectInput(
|
vectorSelectInput(
|
||||||
inputId = ns("method"),
|
inputId = ns("method"),
|
||||||
label = i18n$t("Method:"),
|
label = i18n$t("Method:"),
|
||||||
|
|
@ -388,6 +381,7 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
||||||
# shiny::req(rv$new_var_name)
|
# shiny::req(rv$new_var_name)
|
||||||
data <- req(data_cutted_r())
|
data <- req(data_cutted_r())
|
||||||
# variable <- req(input$variable)
|
# variable <- req(input$variable)
|
||||||
|
|
||||||
count_data <- as.data.frame(
|
count_data <- as.data.frame(
|
||||||
table(
|
table(
|
||||||
breaks = data[[length(data)]],
|
breaks = data[[length(data)]],
|
||||||
|
|
@ -395,6 +389,8 @@ cut_variable_server <- function(id, data_r = reactive(NULL)) {
|
||||||
),
|
),
|
||||||
responseName = "count"
|
responseName = "count"
|
||||||
)
|
)
|
||||||
|
count_data$freq <- paste(signif(count_data$count/nrow(data)*100,3),"%")
|
||||||
|
# browser()
|
||||||
gridTheme <- getOption("datagrid.theme")
|
gridTheme <- getOption("datagrid.theme")
|
||||||
if (length(gridTheme) < 1) {
|
if (length(gridTheme) < 1) {
|
||||||
datamods:::apply_grid_theme()
|
datamods:::apply_grid_theme()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue