shinyjs

Need to build dependency for 3 InsertUI fields coming from Excel sheet in RShiny

半世苍凉 提交于 2020-06-23 14:16:34
问题 I am pretty new to R and was trying to build a small utility just for my learning. I have 3 fields in my excel workbook named: Country State Cities All these fields should come as a drop down in UI. What I want to achieve is: 'when I make a selection for Country, a new drop down for State should get created with a list of States that falls under the Country selected. And based on the state selected the underlying cities should get populated in the drop down' I found a few examples online, but

Need to build dependency for 3 InsertUI fields coming from Excel sheet in RShiny

非 Y 不嫁゛ 提交于 2020-06-23 14:13:28
问题 I am pretty new to R and was trying to build a small utility just for my learning. I have 3 fields in my excel workbook named: Country State Cities All these fields should come as a drop down in UI. What I want to achieve is: 'when I make a selection for Country, a new drop down for State should get created with a list of States that falls under the Country selected. And based on the state selected the underlying cities should get populated in the drop down' I found a few examples online, but

Shiny: Trigger a popup by clicking a valueBox

半腔热情 提交于 2020-06-10 02:04:55
问题 I want to display a table of data in a pop-up window by clicking on valueBox . The valueBox itself should work as an actionButton . When I click on the valueBox it should render a table in pop-up window as in the picture below. Can anyone help on this code? My code: library(shiny) library(shinydashboard) data <- iris ui <- dashboardPage( dashboardHeader(title = "Telemedicine HP"), dashboardSidebar(), dashboardBody( fluidRow( valueBox( 60, subtitle = tags$p("Attended", style = "font-size: 200%

Shiny: Trigger a popup by clicking a valueBox

坚强是说给别人听的谎言 提交于 2020-06-10 02:04:13
问题 I want to display a table of data in a pop-up window by clicking on valueBox . The valueBox itself should work as an actionButton . When I click on the valueBox it should render a table in pop-up window as in the picture below. Can anyone help on this code? My code: library(shiny) library(shinydashboard) data <- iris ui <- dashboardPage( dashboardHeader(title = "Telemedicine HP"), dashboardSidebar(), dashboardBody( fluidRow( valueBox( 60, subtitle = tags$p("Attended", style = "font-size: 200%

Shiny - dynamically generated inputs

旧城冷巷雨未停 提交于 2020-04-30 09:34:44
问题 In my shiny code i am generating inputs dynamically and i am trying to make the observe() to be triggered by any change in those inputs. I found this link Shiny - observe() triggered by dynamicaly generated inputs which was very useful but didn't work with all kind of inputs. I added to the code in the link extra inputs That's the code: library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(title = ""), dashboardSidebar( ), dashboardBody( tags$script("$(document).on(

have Rshiny app user upload image to dropbox /shiny server / google drive

寵の児 提交于 2020-03-02 10:54:53
问题 I am almost done creating a survey using Rshiny. I want to create a button that will allow the user to upload an image (jpeg,tiff,png etc) to the R shiny server, Dropbox, or google drive. It seems the fileInput method only accepts documents like csv? any help would be appreciated! 回答1: fileInput actually allows the import of any type of files. You just need to set the argument accept to NULL or to any file extension that you accept. What you need to understand first, is that if you use

Auto-resize textAreaInput created through renderUI

瘦欲@ 提交于 2020-02-06 07:29:27
问题 I'm trying to get my textAreaInput s to resize so that they display the entire area's contents by default. Following this, auto-resize textAreaInput in shiny R, I can get one to work with a textAreaInput created under ui (as in, the textAreaInput resizes appropriately). I can't get it to work (as in, the textAreaInput does not resize) when creating the textAreaInput as part of renderUI , let alone as part of a module. I'm happy to make use of shinyjs if it's helpful. The underlying problem

get ID of element under cursor in shiny

邮差的信 提交于 2020-01-25 11:59:07
问题 In my Shiny app, the user mouses over some HTML output which consists of several spans, like this: <div id="mydiv"> <span id="span1">foo</span> <span id="span2">bar</span> </div> I want to get the ID of the span which the user is currently mousing over as a shiny input$... I know there are lots of js ways to do it, jquery get element where the cursor is, but I don't know how to integrate with Shiny, e.g. by using shinyjs https://deanattali.com/shinyjs/extend. 回答1: Like this, if I correctly

shiny: start the app with hidden tabs, with NO delay

风流意气都作罢 提交于 2020-01-10 14:54:33
问题 I would like to build an application and some of the tabs will be hidden to the user until he types the right password. I know how to do this with shinyjs::hideTab : library(shiny);library(shinyjs) ui <- fluidPage(useShinyjs(), navbarPage("hello", id="hello", tabPanel("home", br(), h3("this is home"),passwordInput("pass", "enter 'password' to see the tabs: "),actionButton("enter", "enter")), tabPanel("tab2", br(), h4("this is tab2")), tabPanel("tab3 with a lot of stuff in it", br(), h4("this

Reset inputs with reactive app in shiny

孤者浪人 提交于 2020-01-07 03:53:07
问题 I want to add an actionbutton to reset my inputs. For example here, I want all inputs with "All name" "All gender" and "All age" ... I tried with shinyjs but unfortunately doesnt work Any help will be appreciated l <- NULL l$name <- c('b','e','d','b','b','d','e','e','b','b') l$age <- c(20,20,21,21,20,22,22,30,21,32) l$gender <- c('Female', 'Female', 'Male', 'Female', 'Male','Male', 'Female','Male',"Female","Male") l <- as.data.frame(l) l$name <- as.character(l$name) l$age <- as.numeric(l$age)