Shiny

Is it possible to add dynamically a new item in a shiny accordion

∥☆過路亽.° 提交于 2020-03-20 12:48:21
问题 Is it possible to add dynamically a new item in a shiny accordion, for example when clicking on a button ? below a non-working example using dq_accordion from the dqshiny package Thanks ! library(shiny) library(dqshiny) shinyApp( ui = fluidPage( fluidRow( actionButton("add", "+"), dq_accordion("myAccordion", titles = paste0("input",1:3), contents = list(textInput(inputId = "txt1", label = ""), textInput(inputId = "txt2", label = ""), textInput(inputId = "txt3", label = "")), bg_color = NULL,

How to include an action link into a button's label?

不羁的心 提交于 2020-03-20 10:39:03
问题 My goal is to include an action link (that displays a help text) into the label of a selectInput button. library(shiny) ui <- fluidPage( br(), selectInput( inputId = "some_id", label = "Please choose A or B (get help)", choices = c("choice A", "choice B"), selected = "choice A", selectize = F ), actionLink(inputId = "action_link", label = "get help") ) # fluidPage server <- function(input, output) {} shinyApp(ui, server) I guess the solution is to use label = HTML(...) , but I do not know how

Can users interactively draw rectangles on an image in R (via Shiny app)

纵饮孤独 提交于 2020-03-18 05:22:05
问题 I want to be able to draw a rectangle on an image. I was thinking of using Shiny to make the app, but I first need to work out how to draw a rectangle on an image? Does anyone have any ideas or pointers? My thinking was that I need to layer my image, my image is always 640x640 pixels, so my thinking was a matrix of 640x640 over the top of the image that lets me select the "pixels" to create the boundary of the rectangle? Edit: I've got further, I can now draw on an image in shiny using the

Can users interactively draw rectangles on an image in R (via Shiny app)

試著忘記壹切 提交于 2020-03-18 05:21:44
问题 I want to be able to draw a rectangle on an image. I was thinking of using Shiny to make the app, but I first need to work out how to draw a rectangle on an image? Does anyone have any ideas or pointers? My thinking was that I need to layer my image, my image is always 640x640 pixels, so my thinking was a matrix of 640x640 over the top of the image that lets me select the "pixels" to create the boundary of the rectangle? Edit: I've got further, I can now draw on an image in shiny using the

Can users interactively draw rectangles on an image in R (via Shiny app)

混江龙づ霸主 提交于 2020-03-18 05:20:25
问题 I want to be able to draw a rectangle on an image. I was thinking of using Shiny to make the app, but I first need to work out how to draw a rectangle on an image? Does anyone have any ideas or pointers? My thinking was that I need to layer my image, my image is always 640x640 pixels, so my thinking was a matrix of 640x640 over the top of the image that lets me select the "pixels" to create the boundary of the rectangle? Edit: I've got further, I can now draw on an image in shiny using the

checkboxGroupInput - set minimum and maximum number of selections - ticks

偶尔善良 提交于 2020-03-18 04:54:33
问题 Here is example code with check-box group input: library(shiny) server <- function(input, output) { output$Selected <- renderText({ paste(input$SelecetedVars,collapse=",") }) } ui <- fluidPage( sidebarLayout( sidebarPanel( checkboxGroupInput("SelecetedVars", "MyList:", paste0("a",1:5), selected = "a1") ), mainPanel(textOutput("Selected")) ) ) shinyApp(ui = ui, server = server) As you you can see from image above we can select as many as we want, in this case 4 out of 5. How can I set minimum

checkboxGroupInput - set minimum and maximum number of selections - ticks

元气小坏坏 提交于 2020-03-18 04:54:13
问题 Here is example code with check-box group input: library(shiny) server <- function(input, output) { output$Selected <- renderText({ paste(input$SelecetedVars,collapse=",") }) } ui <- fluidPage( sidebarLayout( sidebarPanel( checkboxGroupInput("SelecetedVars", "MyList:", paste0("a",1:5), selected = "a1") ), mainPanel(textOutput("Selected")) ) ) shinyApp(ui = ui, server = server) As you you can see from image above we can select as many as we want, in this case 4 out of 5. How can I set minimum

Leaflet legend for addAwesomeMarkers function with icons

佐手、 提交于 2020-03-17 09:19:17
问题 Is there any way to create a leaflet legend for addAwesomeMarkers function with right colors and icons. For example, in the following map, I would like to create a legend given under the code. library(leaflet) IconSet <- awesomeIconList( ship = makeAwesomeIcon(icon= 'ship', markerColor = 'green', iconColor = 'white', library = "fa"), pirate = makeAwesomeIcon(icon= 'fire', markerColor = 'blue', iconColor = 'white', library = "fa") ) # Some fake data df <- sp::SpatialPointsDataFrame( cbind(

Parent/Child Rows in R

陌路散爱 提交于 2020-03-17 03:06:03
问题 I'm trying to use some JavaScript to create a nice table layout with parents/child nesting. I only need one child per parent. I have two data frames. The goal here is to make a table that combines these two data frames. So far I am able to do that. However, the problem here is that I can only get the code to work for one row in df1. When I go to add in another row to df1 I get Error in data.frame: arguments imply differing number of rows: 1, 2 . For example, the desired result is achieved

Parent/Child Rows in R

做~自己de王妃 提交于 2020-03-17 03:05:33
问题 I'm trying to use some JavaScript to create a nice table layout with parents/child nesting. I only need one child per parent. I have two data frames. The goal here is to make a table that combines these two data frames. So far I am able to do that. However, the problem here is that I can only get the code to work for one row in df1. When I go to add in another row to df1 I get Error in data.frame: arguments imply differing number of rows: 1, 2 . For example, the desired result is achieved