Shiny

Shiny customize selectInput/selectizeInput

我的梦境 提交于 2021-02-07 21:15:36
问题 I want my Shiny select input to: Has no label Has customized background colour: #2f2d57 Has placeholder Enable users to type-in and select However, I can't make the app follow the above 4 rules together. My codes are below: Data: table <- data.frame(col1 = c(3, 4, 8, 5, 2, 6, 7)) Attempt 1 Problem: Users are unable to type-in and select from the selectInput ui <- fluidPage( uiOutput("container") ) server <- function(input, output) { output$container <- renderUI({ fluidRow( tags$style("#three

Shiny customize selectInput/selectizeInput

浪子不回头ぞ 提交于 2021-02-07 21:11:49
问题 I want my Shiny select input to: Has no label Has customized background colour: #2f2d57 Has placeholder Enable users to type-in and select However, I can't make the app follow the above 4 rules together. My codes are below: Data: table <- data.frame(col1 = c(3, 4, 8, 5, 2, 6, 7)) Attempt 1 Problem: Users are unable to type-in and select from the selectInput ui <- fluidPage( uiOutput("container") ) server <- function(input, output) { output$container <- renderUI({ fluidRow( tags$style("#three

R visNetwork: Multiple graph layout?

邮差的信 提交于 2021-02-07 20:21:05
问题 I would like to position two visNetwork plots side-by-side for visual comparison. Multi-plot positioning is possible using igraph with par() or layout(). Is there a way to do this for visNetwork? Work-arounds/kludges (including RShiny, etc.) are acceptable answers - whatever works to provide a side-by-side visNetwork display. Note that ID numbers etc. overlap, so putting both networks into the same graph would be a lot of data manipulation that I wish to avoid. Here is an example of the type

R visNetwork: Multiple graph layout?

☆樱花仙子☆ 提交于 2021-02-07 20:20:29
问题 I would like to position two visNetwork plots side-by-side for visual comparison. Multi-plot positioning is possible using igraph with par() or layout(). Is there a way to do this for visNetwork? Work-arounds/kludges (including RShiny, etc.) are acceptable answers - whatever works to provide a side-by-side visNetwork display. Note that ID numbers etc. overlap, so putting both networks into the same graph would be a lot of data manipulation that I wish to avoid. Here is an example of the type

R shiny session with multiple users connected

孤街醉人 提交于 2021-02-07 20:07:21
问题 Minimal reproducible example: library("shiny") ui <- fluidPage( actionButton("button1", "Run 1"), actionButton("button2", "Run 2") ) server <- function(session, input, output) { cat("session starts\n") observeEvent(input$button1, { cat("1 starts\n") Sys.sleep(15) cat("1 stops\n") }) observeEvent(input$button2, { cat("2 starts\n") Sys.sleep(15) cat("2 stops\n") }) } shinyApp(ui = ui, server = server) Each button simulates running some long cpu-intensive algorithm. Run the app and open a

R shiny session with multiple users connected

元气小坏坏 提交于 2021-02-07 20:02:14
问题 Minimal reproducible example: library("shiny") ui <- fluidPage( actionButton("button1", "Run 1"), actionButton("button2", "Run 2") ) server <- function(session, input, output) { cat("session starts\n") observeEvent(input$button1, { cat("1 starts\n") Sys.sleep(15) cat("1 stops\n") }) observeEvent(input$button2, { cat("2 starts\n") Sys.sleep(15) cat("2 stops\n") }) } shinyApp(ui = ui, server = server) Each button simulates running some long cpu-intensive algorithm. Run the app and open a

Copy a Shiny DT row to users clipboard

不羁的心 提交于 2021-02-07 19:51:49
问题 Is there a way to have the selected row(s) in a shiny datatable (DT) be available for the user to copy (Ctrl+C) to their clipboard. Ideally it would also supply the data table's column names or headers. UPDATE global.R library(rclipboard) library(shiny) ui.R: ... rclipboardSetup(), ... uiOutput("copy"), server.R: output$copy = renderUI({ s = input$orders_rows_selected rclipButton("copybtm","Copy",data()[s,],icon("clipboard")) }) 回答1: Here is how to get a button to copy the selected rows. And

Shiny datatable: popup data about selected row in a new window

梦想的初衷 提交于 2021-02-07 18:17:21
问题 I have a datatable in shiny. When a user selects a certain row, I want to display some other data based on the selected row in a new window. I tried to use shinyBS package but I could not use it without action button and I don't want to include action button. I want the pop up to display when a row is selected. Any ideas? mymtcars = head(mtcars) for_pop_up = 1:6 app <- shinyApp( ui = fluidPage( DT::dataTableOutput("mydatatable") ), server = shinyServer(function(input, output, session) {

R shiny uncheck checkboxGroup with actionbutton

回眸只為那壹抹淺笑 提交于 2021-02-07 18:16:58
问题 I have checkboxGroup with selected items, and actionButton. I need on actionButton click uncheck checkBoxGroup. wellPanel( checkboxGroupInput(datename, "Select dates:", some_dates, selected = outlier_dates_to_select), actionButton("buttonname", "Uncheck all") ) Any suggestions, how I can manage that? Thank you a lot! 回答1: You have to use actionButton like this for example : In ui.R : shinyUI(pageWithSidebar( headerPanel(title=""), sidebarPanel( checkboxGroupInput("Test1", "Test1", choices=c(

Shiny datatable: popup data about selected row in a new window

孤者浪人 提交于 2021-02-07 18:16:31
问题 I have a datatable in shiny. When a user selects a certain row, I want to display some other data based on the selected row in a new window. I tried to use shinyBS package but I could not use it without action button and I don't want to include action button. I want the pop up to display when a row is selected. Any ideas? mymtcars = head(mtcars) for_pop_up = 1:6 app <- shinyApp( ui = fluidPage( DT::dataTableOutput("mydatatable") ), server = shinyServer(function(input, output, session) {