Shiny

Shiny Bookmarking is not Working If I Changed the Formatting of Numeric Input

橙三吉。 提交于 2020-01-14 04:08:28
问题 I want to design an app using Shiny that allows users to bookmark the input values. However, I found that if I changed the input format of the numericInput , bookmarking will not work. Based on this link (https://beta.rstudioconnect.com/barbara/format-numbers/) to format the input of a numericInput . I created a js file called number_format.js and stored the file in the directory www . The code is as follows. $(document).ready(function() { // Helper function to guarantee cross-browser

Shiny Interdependent Filters values

江枫思渺然 提交于 2020-01-14 04:03:52
问题 Unable to make the similar functionality of filters which should be interdependent. So that means if user select a input from one filter, all other filters should get updated. I have tried multiple ways in shiny but unable to do so however found some code on stackoverflow with similar functionality. The only challenge is that i don't want to show the table as a output and unfortunately the code does not work if we don't pass the output to #tableprint [id of a table]. Any help would be really

Is it possible to set the tickboxes selected by default in a DT datatable?

妖精的绣舞 提交于 2020-01-14 03:23:28
问题 I would like to ask if it is possible to have the tickboxes of all the rows selected by default -instead of deselected- in a DT datatable. library(DT) library(tidyverse) dataTableOutput("irisTable") output$irisTable <- renderDataTable( iris %>% rowid_to_column("Row") %>% mutate(Row = ""), rownames = FALSE, extensions = "Select", options = list( columnDefs = list(list(className = "select-checkbox", targets = 0, orderable = FALSE)), select = list(style = "multi", selector = "td:first-child") ))

Get the current image name of a slickR slideshow in shiny

老子叫甜甜 提交于 2020-01-14 02:48:28
问题 Below is a shiny app which displays a slideshow of images with the slickR package. How to get the name of the current image? library(shiny) library(slickR) ui <- fluidPage( tags$div( slickROutput("slickr", width="500px"), style = "margin-left:100px;" ) ) server <- function(input, output) { imgs <- list.files("~/", pattern=".png", full.names = TRUE) output[["slickr"]] <- renderSlickR({ slickR(imgs) }) } # Run the application shinyApp(ui = ui, server = server) 回答1: Here is a solution with a

R Shiny - How to create a barplot that reacts according to the time unit (Week, Month, Year) and aggregates data by time unit

半腔热情 提交于 2020-01-14 02:17:27
问题 I generate a dataframe about a disease with the following variables: Date (date of disease) Cases (number of cases, by default, the number of cases is 1) Week (week of disease case) Month (month of disease case) Year (year of disease case). My ui is here: library(shiny) library(dplyr) library(lubridate) library(ggplot2) library(scales) Disease<-data.frame(Date=seq(as.Date("2015/1/1"), as.Date("2017/1/1"), "days"),Cases=rep(1)) Disease$Week<-as.Date(cut(Disease$Date,breaks="week",start.on

R Shiny - How to create a barplot that reacts according to the time unit (Week, Month, Year) and aggregates data by time unit

柔情痞子 提交于 2020-01-14 02:17:05
问题 I generate a dataframe about a disease with the following variables: Date (date of disease) Cases (number of cases, by default, the number of cases is 1) Week (week of disease case) Month (month of disease case) Year (year of disease case). My ui is here: library(shiny) library(dplyr) library(lubridate) library(ggplot2) library(scales) Disease<-data.frame(Date=seq(as.Date("2015/1/1"), as.Date("2017/1/1"), "days"),Cases=rep(1)) Disease$Week<-as.Date(cut(Disease$Date,breaks="week",start.on

Shinydashboard - Change background based on selected tab

亡梦爱人 提交于 2020-01-14 01:47:52
问题 I am creating a dashboard using Shinydashboard package, where I need to change the background color based on the selected Tab. I have tried the following code, but it is not working as intended. library(shiny) library(shinydashboard) library(dplyr) ui <- dashboardPage(dashboardHeader(dropdownMenuOutput("notificationMenu")), dashboardSidebar(sidebarMenu(menuItem("Page 1", tabName = "page1"), menuItem("Page 2", tabName = "page2"))), dashboardBody(tags$style(".content {background-color: #f7f7f7;

Shinydashboard - Change background based on selected tab

那年仲夏 提交于 2020-01-14 01:47:47
问题 I am creating a dashboard using Shinydashboard package, where I need to change the background color based on the selected Tab. I have tried the following code, but it is not working as intended. library(shiny) library(shinydashboard) library(dplyr) ui <- dashboardPage(dashboardHeader(dropdownMenuOutput("notificationMenu")), dashboardSidebar(sidebarMenu(menuItem("Page 1", tabName = "page1"), menuItem("Page 2", tabName = "page2"))), dashboardBody(tags$style(".content {background-color: #f7f7f7;

R shiny fileInput large files

你离开我真会死。 提交于 2020-01-14 01:43:29
问题 i have some problem with fileInput for R Shiny. Size limit is set to 5MB per default. Since the files i have to work with are very large (>50GB), I only need the datapath and or name of the file. Unfortunatly fileInput wants to upload the complete file or at least it is loading the file somehow and tells me that the file is too big after i have reached the 5MB limit. How can I only hand over the path to my app without uploading the file? ui.R library(shiny) # Define UI ---- shinyUI(fluidPage(

how to update dataTable in shiny with button

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-13 20:31:06
问题 I am trying to simply update a column of a dataframe once a user presses a button in Shiny. I am a little confused as to how the currently showing dataframe is passed to the server side function. Once the button is pressed the column cyl should be increased by 10. If the button is pressed again the column should take the recalculated values and multiply by a further 10 etc. So far I have done this but nothing seems to happen when the button is pressed. --- title: "My dataframe refresh" output