From cd2f60d3634169e1f9c5edec7b84627384051ea2 Mon Sep 17 00:00:00 2001 From: pvictor Date: Thu, 16 May 2024 11:50:04 +0200 Subject: [PATCH] update factor: added winbox options + translations --- NAMESPACE | 1 + NEWS.md | 1 + R/create-column.R | 2 +- R/update-factor.R | 36 ++++++++++++++++++++++++++++++++++-- examples/update_factor.R | 13 ++++++++++++- inst/i18n/al.csv | 7 ++++--- inst/i18n/cn.csv | 9 +++++---- inst/i18n/de.csv | 7 ++++--- inst/i18n/es.csv | 7 ++++--- inst/i18n/fr.csv | 7 ++++--- inst/i18n/kr.csv | 7 ++++--- inst/i18n/mk.csv | 7 ++++--- inst/i18n/pl.csv | 7 ++++--- inst/i18n/pt.csv | 7 ++++--- inst/i18n/tr.csv | 7 ++++--- man/create-column.Rd | 10 +++++++++- man/update-factor.Rd | 13 ++++++++++++- 17 files changed, 111 insertions(+), 37 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 9dd04fd..d33ebf3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -43,6 +43,7 @@ export(validation_server) export(validation_ui) export(winbox_create_column) export(winbox_cut_variable) +export(winbox_update_factor) importFrom(classInt,classIntervals) importFrom(data.table,":=") importFrom(data.table,.N) diff --git a/NEWS.md b/NEWS.md index f0fd8a2..af82465 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # datamods 1.5.1 * New module `update_factor_ui()` / `update_factor_server()` to reorder levels of a factor. +* i18n: Updated translations files with new labels, which are automatically translated, if you see incorrect translations, please open an issue or PR : https://github.com/dreamRs/datamods # datamods 1.5.0 diff --git a/R/create-column.R b/R/create-column.R index 5cca19c..fa9420f 100644 --- a/R/create-column.R +++ b/R/create-column.R @@ -251,7 +251,7 @@ modal_create_column <- function(id, #' @importFrom htmltools tagList #' @rdname create-column winbox_create_column <- function(id, - title =i18n( "Create a new column"), + title = i18n("Create a new column"), options = shinyWidgets::wbOptions(), controls = shinyWidgets::wbControls()) { ns <- NS(id) diff --git a/R/update-factor.R b/R/update-factor.R index c25f8d3..d6da17c 100644 --- a/R/update-factor.R +++ b/R/update-factor.R @@ -42,7 +42,7 @@ update_factor_ui <- function(id) { inputId = ns("sort_levels"), label = tagList( ph("sort-ascending"), - i18n("Sort levels") + i18n("Sort by levels") ), class = "btn-outline-primary mb-3", width = "100%" @@ -55,7 +55,7 @@ update_factor_ui <- function(id) { inputId = ns("sort_occurrences"), label = tagList( ph("sort-ascending"), - i18n("Sort count") + i18n("Sort by count") ), class = "btn-outline-primary mb-3", width = "100%" @@ -236,3 +236,35 @@ modal_update_factor <- function(id, footer = footer )) } + + +#' @inheritParams shinyWidgets::WinBox +#' @export +#' +#' @importFrom shinyWidgets WinBox wbOptions wbControls +#' @importFrom htmltools tagList +#' @rdname create-column +winbox_update_factor <- function(id, + title = i18n("Update levels of a factor"), + options = shinyWidgets::wbOptions(), + controls = shinyWidgets::wbControls()) { + ns <- NS(id) + WinBox( + title = title, + ui = tagList( + update_factor_ui(id), + tags$div( + style = "display: none;", + textInput(inputId = ns("hidden"), label = NULL, value = genId()) + ) + ), + options = modifyList( + shinyWidgets::wbOptions(height = "615px", modal = TRUE), + options + ), + controls = controls, + auto_height = FALSE + ) +} + + diff --git a/examples/update_factor.R b/examples/update_factor.R index 15f10ef..18601d5 100644 --- a/examples/update_factor.R +++ b/examples/update_factor.R @@ -5,12 +5,15 @@ library(ggplot2) ui <- fluidPage( theme = bslib::bs_theme(version = 5L, preset = "bootstrap"), + shinyWidgets::html_dependency_winbox(), tags$h2("Reorder the Levels of a Factor"), fluidRow( column( width = 6, update_factor_ui("id"), - actionButton("modal", "Or click here to open a modal to update factor's level") + actionButton("modal", "Or click here to open a modal to update factor's level"), + tags$br(), tags$br(), + actionButton("winbox", "Or click here to open a WinBox to create a column") ), column( width = 6, @@ -50,6 +53,14 @@ server <- function(input, output, session) { rv$data <- data_modal_r() }) + # winbox mode + observeEvent(input$winbox, winbox_update_factor("winbox")) + data_winbox_r <- update_factor_server( + id = "winbox", + data_r = reactive(rv$data) + ) + observeEvent(data_winbox_r(), rv$data <- data_winbox_r()) + # Plot results output$plot <- renderPlot({ req(input$var, rv$data) diff --git a/inst/i18n/al.csv b/inst/i18n/al.csv index b33ed97..bc2eba6 100644 --- a/inst/i18n/al.csv +++ b/inst/i18n/al.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Disa operacione nuk lejohen","Automacally translated" "Something went wrong...","Diçka shkoi keq...","" "Sort count","Rendit numërimin","Automacally translated" -"Sort levels","Renditni nivelet","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","URL-ja që shfaqet në shfletuesin tuaj, në këtë rast do të lexohet fleta e parë","" "The row has been deleted","Rreshti është fshirë","" "The row wasn't added to the data","Rreshti nuk u shtua te të dhënat","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","Të dhënat kanë %vëzhgime dhe %variabla","" "if several use a comma ',' to separate them","nëse disa përdorin presje ',' për t'i ndarë","Automacally translated" "lines, i.e.","vijat, d.m.th.","Automacally translated" +"number of rows","numri i rreshtave","Automacally translated" +"proportion of rows","proporcioni i rreshtave","Automacally translated" "rows","rreshtave","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","pastaj futni një shprehje përpara se të klikoni në butonin e mësipërm për të vërtetuar ose aktivizuar","Automacally translated" "to delete it.","për ta fshirë.","Automacally translated" -"number of rows","numri i rreshtave","Automacally translated" -"proportion of rows","proporcioni i rreshtave","Automacally translated" +"Sort by count","Rendit sipas numërimit","Automacally translated" +"Sort by levels","Rendit sipas niveleve","Automacally translated" diff --git a/inst/i18n/cn.csv b/inst/i18n/cn.csv index b0ce314..da7dc00 100644 --- a/inst/i18n/cn.csv +++ b/inst/i18n/cn.csv @@ -33,7 +33,7 @@ "Dataset validation:","鏁版嵁闆嗛獙璇侊細","Automacally translated" "Date format:","日期格式:","" "Date to use as origin to convert date/datetime:","日期转换的起始时间:","" -"Decimal separator:","小数点:""""""""","" +"Decimal separator:","小数点:""""""""""""""""","" "Delete","删除","" "Do you want to delete the selected row ?","您要删除选定的行吗?","" "Encoding:","文件编码:","" @@ -103,7 +103,6 @@ "Some operations are not allowed","鏈変簺鎿嶄綔鏄笉鍏佽鐨�","Automacally translated" "Something went wrong...","出错了...","" "Sort count","鎺掑簭璁℃暟","Automacally translated" -"Sort levels","鎺掑簭绾у埆","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","浏览器复制链接,我们将导入当前工作簿的数据","" "The row has been deleted","该行已被删除","" "The row wasn't added to the data","璇ヨ鏈坊鍔犲埌鏁版嵁涓�","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","数据有 %s 行 %s 列.","" "if several use a comma ',' to separate them","濡傛灉澶氫釜浣跨敤閫楀彿鈥�,鈥濆垎闅�","Automacally translated" "lines, i.e.","绾匡紝鍗�","Automacally translated" +"number of rows","琛屾暟","Automacally translated" +"proportion of rows","琛岀殑姣斾緥","Automacally translated" "rows","琛�","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","鐒跺悗杈撳叆涓€涓〃杈惧紡锛岀劧鍚庡崟鍑讳笂闈㈢殑鎸夐挳杩涜楠岃瘉鎴�","Automacally translated" "to delete it.","鍒犻櫎瀹冦€�","Automacally translated" -"number of rows","琛屾暟","Automacally translated" -"proportion of rows","琛岀殑姣斾緥","Automacally translated" +"Sort by count","鎸夋暟閲忔帓搴�","Automacally translated" +"Sort by levels","鎸夌骇鍒帓搴�","Automacally translated" diff --git a/inst/i18n/de.csv b/inst/i18n/de.csv index 4d46f87..5b3fabb 100644 --- a/inst/i18n/de.csv +++ b/inst/i18n/de.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Einige Vorgänge sind nicht zulässig","Automacally translated" "Something went wrong...","Etwas ist schief gelaufen...","" "Sort count","Anzahl sortieren","Automacally translated" -"Sort levels","Sortierebenen","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","Die URL die im Browser aufscheint, in diesem Fall wird das aktuielle Arbeitsblatt eingelesen","" "The row has been deleted","Die Zeile wurde gelöscht","" "The row wasn't added to the data","Die Zeile wurde nicht zu den Daten hinzugefügt","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","Daten haben %s Einträge und %s Variablen.","" "if several use a comma ',' to separate them","Bei mehreren verwenden Sie zur Trennung ein Komma „,“.","Automacally translated" "lines, i.e.","Linien, d.h.","Automacally translated" +"number of rows","Anzahl der Reihen","Automacally translated" +"proportion of rows","Anteil der Reihen","Automacally translated" "rows","Reihen","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","Geben Sie dann einen Ausdruck ein, bevor Sie zum Bestätigen oder Einschalten auf die Schaltfläche oben klicken","Automacally translated" "to delete it.","um es zu löschen.","Automacally translated" -"number of rows","Anzahl der Reihen","Automacally translated" -"proportion of rows","Anteil der Reihen","Automacally translated" +"Sort by count","Nach Anzahl sortieren","Automacally translated" +"Sort by levels","Nach Ebenen sortieren","Automacally translated" diff --git a/inst/i18n/es.csv b/inst/i18n/es.csv index 6f82994..d6d0f7f 100644 --- a/inst/i18n/es.csv +++ b/inst/i18n/es.csv @@ -105,7 +105,6 @@ "Some operations are not allowed","Algunas operaciones no están permitidas.","Automacally translated" "Something went wrong...","Algo salió mal...","" "Sort count","Ordenar recuento","Automacally translated" -"Sort levels","Ordenar niveles","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","La URL que aparece en su navegador, en ese caso, la hoja actual se leerá","" "The row has been deleted","La fila ha sido eliminada","" "The row wasn't added to the data","La fila no se agregó a los datos.","Automacally translated" @@ -138,8 +137,10 @@ "data has %s obs. of %s variables.","Los datos tienen %s obs. de %s variables.","" "if several use a comma ',' to separate them","si son varios use una coma ',' para separarlos","Automacally translated" "lines, i.e.","líneas, es decir","Automacally translated" +"number of rows","número de filas","Automacally translated" +"proportion of rows","proporción de filas","Automacally translated" "rows","filas","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","luego ingrese una expresión antes de hacer clic en el botón de arriba para validar o en","Automacally translated" "to delete it.","para borrarlo.","Automacally translated" -"number of rows","número de filas","Automacally translated" -"proportion of rows","proporción de filas","Automacally translated" +"Sort by count","Ordenar por conteo","Automacally translated" +"Sort by levels","Ordenar por niveles","Automacally translated" diff --git a/inst/i18n/fr.csv b/inst/i18n/fr.csv index 5c20f1f..219660f 100644 --- a/inst/i18n/fr.csv +++ b/inst/i18n/fr.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Certaines opérations ne sont pas autorisées","Automacally translated" "Something went wrong...","Un problème est survenu...","" "Sort count","Nombre de tris","Automacally translated" -"Sort levels","Niveaux de tri","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","L'URL qui apparaît dans votre navigateur, dans ce cas la feuille active sera lue","" "The row has been deleted","La ligne a été supprimée","" "The row wasn't added to the data","La ligne n'a pas été ajoutée aux données","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","les données ont %s observations et %s colonnes.","" "if several use a comma ',' to separate them","si plusieurs utilisent une virgule ',' pour les séparer","Automacally translated" "lines, i.e.","lignes, c'est-à-dire","Automacally translated" +"number of rows","Nombre de lignes","" +"proportion of rows","Proportion de lignes","" "rows","lignes","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","puis saisissez une expression avant de cliquer sur le bouton ci-dessus pour valider ou sur","Automacally translated" "to delete it.","pour le supprimer.","Automacally translated" -"number of rows","Nombre de lignes","" -"proportion of rows","Proportion de lignes","" +"Sort by count","Trier par nombre","Automacally translated" +"Sort by levels","Trier par niveaux","Automacally translated" diff --git a/inst/i18n/kr.csv b/inst/i18n/kr.csv index a54ec09..b911b9c 100644 --- a/inst/i18n/kr.csv +++ b/inst/i18n/kr.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","�쇰� �묒뾽�€ �덉슜�섏� �딆뒿�덈떎","Automacally translated" "Something went wrong...","臾몄젣媛€ 諛쒖깮�덉뒿�덈떎.","Automacally translated" "Sort count","�뺣젹 �잛닔","Automacally translated" -"Sort levels","�섏� �뺣젹","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","브라우저에 나타난 URL을 붙여넣으면 현재 보고 있는 Sheet가 사용됩니다.","" "The row has been deleted","행이 삭제되었습니다.","" "The row wasn't added to the data","�됱씠 �곗씠�곗뿉 異붽��섏� �딆븯�듬땲��.","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","%s행 변수 %s","" "if several use a comma ',' to separate them","�щ윭 紐낆씠 �쇳몴 ','瑜� �ъ슜�섏뿬 援щ텇�섎뒗 寃쎌슦","Automacally translated" "lines, i.e.","�쇱씤, 利�","Automacally translated" +"number of rows","�� ��","Automacally translated" +"proportion of rows","�됱쓽 鍮꾩쑉","Automacally translated" "rows","��","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","洹몃윴 �ㅼ쓬 �꾩쓽 踰꾪듉�� �대┃�섍린 �꾩뿉 �쒗쁽�앹쓣 �낅젰�섏뿬 �좏슚�깆쓣 寃€�ы븯嫄곕굹","Automacally translated" "to delete it.","��젣�섎젮硫�","Automacally translated" -"number of rows","�� ��","Automacally translated" -"proportion of rows","�됱쓽 鍮꾩쑉","Automacally translated" +"Sort by count","媛쒖닔蹂꾨줈 �뺣젹","Automacally translated" +"Sort by levels","�덈꺼蹂꾨줈 �뺣젹","Automacally translated" diff --git a/inst/i18n/mk.csv b/inst/i18n/mk.csv index bc00e93..f5c28b1 100644 --- a/inst/i18n/mk.csv +++ b/inst/i18n/mk.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Некои операции не се дозволени","Automacally translated" "Something went wrong...","Тука нема податоци...","" "Sort count","Броење сортирање","Automacally translated" -"Sort levels","Подреди нивоа","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","URL коешто се појавува во вашиот пребарарувач, во овој случај првата страна ќе биде прочитана","" "The row has been deleted","Редот е избришан","" "The row wasn't added to the data","Редот не беше додаден на податоците","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","Податоците имаат % обсерваци и % променливи","" "if several use a comma ',' to separate them","ако неколку користат запирка ',' за да ги разделат","Automacally translated" "lines, i.e.","линии, т.е.","Automacally translated" +"number of rows","број на редови","Automacally translated" +"proportion of rows","пропорција на редови","Automacally translated" "rows","редови","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","потоа внесете израз пред да кликнете на копчето погоре за да потврдите или да го вклучите","Automacally translated" "to delete it.","да го избришете.","Automacally translated" -"number of rows","број на редови","Automacally translated" -"proportion of rows","пропорција на редови","Automacally translated" +"Sort by count","Подреди по број","Automacally translated" +"Sort by levels","Подреди по нивоа","Automacally translated" diff --git a/inst/i18n/pl.csv b/inst/i18n/pl.csv index 1b5672f..efded12 100644 --- a/inst/i18n/pl.csv +++ b/inst/i18n/pl.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Niektóre operacje są niedozwolone","Automacally translated" "Something went wrong...","Coś poszło nie tak...","" "Sort count","Liczba sortowań","Automacally translated" -"Sort levels","Poziomy sortowania","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","Linku z przeglądarki (zostanie odczytany aktualny arkusz)","" "The row has been deleted","Wiersz został usunięty","" "The row wasn't added to the data","Wiersz nie został dodany do danych","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","dane zawierają %s obserwacji %s zmiennych.","" "if several use a comma ',' to separate them","jeśli kilka z nich użyje przecinka „,” aby je oddzielić","Automacally translated" "lines, i.e.","linie, tj.","Automacally translated" +"number of rows","Liczba rzędów","Automacally translated" +"proportion of rows","proporcja rzędów","Automacally translated" "rows","wydziwianie","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","następnie wprowadź wyrażenie przed kliknięciem przycisku powyżej, aby zatwierdzić lub włączyć","Automacally translated" "to delete it.","aby go usunąć.","Automacally translated" -"number of rows","Liczba rzędów","Automacally translated" -"proportion of rows","proporcja rzędów","Automacally translated" +"Sort by count","Sortuj według liczby","Automacally translated" +"Sort by levels","Sortuj według poziomów","Automacally translated" diff --git a/inst/i18n/pt.csv b/inst/i18n/pt.csv index 2655e56..d509cdf 100644 --- a/inst/i18n/pt.csv +++ b/inst/i18n/pt.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Algumas operações não são permitidas","Automacally translated" "Something went wrong...","Algo deu errado...","" "Sort count","Contagem de classificação","Automacally translated" -"Sort levels","Classificar níveis","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","A URL que aparece no seu navegador, nesse caso a aba atual será lida","" "The row has been deleted","A linha foi excluída","" "The row wasn't added to the data","A linha não foi adicionada aos dados","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","dados possuem %s observações de %s variáveis.","" "if several use a comma ',' to separate them","se vários usarem uma vírgula ',' para separá-los","Automacally translated" "lines, i.e.","linhas, ou seja,","Automacally translated" +"number of rows","numero de linhas","Automacally translated" +"proportion of rows","proporção de linhas","Automacally translated" "rows","linhas","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","em seguida, insira uma expressão antes de clicar no botão acima para validar ou em","Automacally translated" "to delete it.","para excluí-lo.","Automacally translated" -"number of rows","numero de linhas","Automacally translated" -"proportion of rows","proporção de linhas","Automacally translated" +"Sort by count","Classificar por contagem","Automacally translated" +"Sort by levels","Classificar por níveis","Automacally translated" diff --git a/inst/i18n/tr.csv b/inst/i18n/tr.csv index ca7f014..6ef0cc0 100644 --- a/inst/i18n/tr.csv +++ b/inst/i18n/tr.csv @@ -103,7 +103,6 @@ "Some operations are not allowed","Bazı işlemlere izin verilmiyor","Automacally translated" "Something went wrong...","Bir şeyler ters gitti...","" "Sort count","Sıralama sayısı","Automacally translated" -"Sort levels","Düzeyleri sırala","Automacally translated" "The URL that appear in your browser, in that case the current sheet will be read","Tarayıcınızda görünen URL, bu durumda geçerli sayfa okunacak","" "The row has been deleted","Satır silinemiyor, platform yöneticisiyle iletişime geçin","" "The row wasn't added to the data","Satır verilere eklenmedi","Automacally translated" @@ -135,8 +134,10 @@ "data has %s obs. of %s variables.","veri %s gözlem %s değişken içeriyor.","" "if several use a comma ',' to separate them","birkaç kişi onları ayırmak için ',' virgülünü kullanıyorsa","Automacally translated" "lines, i.e.","çizgiler, yani","Automacally translated" +"number of rows","satır sayısı","Automacally translated" +"proportion of rows","satırların oranı","Automacally translated" "rows","satırlar","Automacally translated" "then enter an expression before clicking on the button above to validate or on ","ardından doğrulamak için yukarıdaki düğmeye tıklamadan önce bir ifade girin veya","Automacally translated" "to delete it.","silmek için.","Automacally translated" -"number of rows","satır sayısı","Automacally translated" -"proportion of rows","satırların oranı","Automacally translated" +"Sort by count","Sayıya göre sırala","Automacally translated" +"Sort by levels","Düzeylere göre sırala","Automacally translated" diff --git a/man/create-column.Rd b/man/create-column.Rd index 52f1503..7de3b47 100644 --- a/man/create-column.Rd +++ b/man/create-column.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/create-column.R +% Please edit documentation in R/create-column.R, R/update-factor.R \name{create-column} \alias{create-column} \alias{create_column_ui} @@ -7,6 +7,7 @@ \alias{list_allowed_operations} \alias{modal_create_column} \alias{winbox_create_column} +\alias{winbox_update_factor} \title{Create new column} \usage{ create_column_ui(id) @@ -33,6 +34,13 @@ winbox_create_column( options = shinyWidgets::wbOptions(), controls = shinyWidgets::wbControls() ) + +winbox_update_factor( + id, + title = i18n("Update levels of a factor"), + options = shinyWidgets::wbOptions(), + controls = shinyWidgets::wbControls() +) } \arguments{ \item{id}{Module's ID.} diff --git a/man/update-factor.Rd b/man/update-factor.Rd index f291e74..73a4895 100644 --- a/man/update-factor.Rd +++ b/man/update-factor.Rd @@ -54,12 +54,15 @@ library(ggplot2) ui <- fluidPage( theme = bslib::bs_theme(version = 5L, preset = "bootstrap"), + shinyWidgets::html_dependency_winbox(), tags$h2("Reorder the Levels of a Factor"), fluidRow( column( width = 6, update_factor_ui("id"), - actionButton("modal", "Or click here to open a modal to update factor's level") + actionButton("modal", "Or click here to open a modal to update factor's level"), + tags$br(), tags$br(), + actionButton("winbox", "Or click here to open a WinBox to create a column") ), column( width = 6, @@ -99,6 +102,14 @@ server <- function(input, output, session) { rv$data <- data_modal_r() }) + # winbox mode + observeEvent(input$winbox, winbox_update_factor("winbox")) + data_winbox_r <- update_factor_server( + id = "winbox", + data_r = reactive(rv$data) + ) + observeEvent(data_winbox_r(), rv$data <- data_winbox_r()) + # Plot results output$plot <- renderPlot({ req(input$var, rv$data)