shinydashboard

How to reactively change title of ShinyDashboard box in R?

旧时模样 提交于 2019-12-10 12:21:50
问题 My code looks like below where user can select location from sidebarpanel and based on user selection data is displayed in mainpanel . Next, I would like to dynamically change the title of the plot based on user selection. For example, If user selects location1 then the tile of Plot should display "Loc1"(Below image highlights the place where, I need to change my title) .I am not sure how to achieve this in ShinyDashboard Please provide explanation with code. Code: library(shiny) library

shiny app for multiple users to edit

拈花ヽ惹草 提交于 2019-12-10 12:07:09
问题 I wonder if I can create a shiny app (something similar to excel spreadsheet) that I can authorize multiple users to log in (like using shinyapp.io) to edit/input simultaneously? The reason I want to use shiny rather than only excel spreadsheet is because I might add more features (such as statistical estimation, visualization, etc.) based on the data uploaded by multiple users using R. Look forward to any suggestions/advice Thanks! 回答1: I found the following pattern working for me: Create a

How can I add logo besides project name in shiny dashboard?

[亡魂溺海] 提交于 2019-12-10 10:46:25
问题 Please can you help me to add company logo on the left top of shiny dashboard besides project name. I have tried to use the code in the other answers here on stackoverflow but still can't solve my problem. I am a total ignorant in HTML and css. Here is my code: library(shiny) library(shinydashboard) shinyApp( ui = dashboardPage(skin = "green", dashboardHeader(title = "Project name", # this could show the logo but not where I wanted ! tags$li(a(href = 'http://www.company.com', img(src = 'logo

How to use the download button in Shiny?

给你一囗甜甜゛ 提交于 2019-12-10 10:42:19
问题 I want to download a csv file using the download button in Shiny. The file would be created using the parameters from a secondary r script. ###SERVER output$downloadData <- downloadHandler({ filename = function() { paste('data-', Sys.Date(), '.csv', sep='') } content = function(file) { csv_write<-array(0,dim=c(length(GHI_D),15)) csv_write<-cbind(GHI_Data$timeStamp,GHI_D,POA_OBS_T,POA_model_T,POA_model_FT,POA_OBS,DNI_model,DHI,tracking_angle,incidence_angel_T,Backtracking_angle,SunAz,SunEl,Kt

How to Add edit delete of table in shiny app

微笑、不失礼 提交于 2019-12-10 00:47:51
问题 I want to CRUD(Create, read,update and delete) in a table in shiny app. it update and delete perfectly but when I want to add new record it does not show the input from slider when the textinput is filled. Sometimes it only shows the default of sliderInput which is 2 when the value of name is NULL. ui <- fluidPage( #use shiny js to disable the ID field shinyjs::useShinyjs(), #DT::dataTableOutput("responses"), shinyjs::disabled(textInput("id", "Id", "0")), textInput("name", "Name", ""),

Shinydashboard 'topbar'

给你一囗甜甜゛ 提交于 2019-12-09 15:50:14
问题 Is it possible to place some items in the horizontal bar next to the dashboardHeader ? I know you can place notificationItem on the far right like in this example. But I would like to use the same options as in dashboardSidebar like adding filters etc. I want such a filter on top: 回答1: Based on Pork Chop answer, you can simply use selectInput (or other shiny inputs) that you put in a div with float:left to span horizontally: CustomHeader <- dashboardHeader() CustomHeader$children[[3]]

Show dataTableOutput in modal in shiny app

青春壹個敷衍的年華 提交于 2019-12-09 07:21:16
问题 Great R community, I am just wondering if it is possible to show DT::dataTableOutput in a modal with the push of an action button. For example, data table output as something like following. Here is a some code to begin with: ## app.R ## library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), ## Sidebar content dashboardSidebar( sidebarMenu( menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")) ) ), ## Body content dashboardBody( tabItems( # First tab

Identify position of a click on a raster in leaflet, in R

痴心易碎 提交于 2019-12-09 05:52:56
问题 I am plotting a large lat-lon NetCDF raster over an R leaflet map using shinydashboard . When I click on the map, a popup comes out and shows row, column, lat-lon position and value of the clicked raster point. (See reproducible code below) The problem is that I am experiencing a shift in the raster if the raster is large enough. For example, here I clicked on a point which should have a value, but the result is that the identified point is the one above. I believe this has to do with the

Add different static colors for sliderbar in shiny dashboard

二次信任 提交于 2019-12-08 21:59:11
问题 I am new to shiny. I would like to give static color for the slider bar irrespective of the range selected in shiny dashboard. I want to have different color for slider as follows, Ex: 0 to 40 – red, 40 to 60 – blue, 60 to 100 – green. Please help me solve this issue. My code, library(shiny) library(shinydashboard) ui <- dashboardPage(skin = "black", dashboardHeader(title = "test"), dashboardSidebar( sidebarMenu( menuItem("Complete", tabName = "comp"))), dashboardBody( tabItems( tabItem

Creating a SQL query using selectinput in R shiny

你。 提交于 2019-12-08 18:14:25
I am trying to create a dynamic query using select input. Something like Select * from basket where fruits in("apple","banana","cherry") I have a table called fruit_list which populates my selectinput box. selectInput("fruit_list", label = h5("Select fruit"), multiple = T, choices = (dbGetQuery(conn, "SELECT fruit from fruit_list');"))) So far, when i renderprint my selection I get "apple" "banana" "cherry" I need a comma between the elements to get "apple","banana","cherry" When i choose a single element from the multiselect box "apple" Select * from basket where fruits in("apple") my