shinydashboard

How to remove option bar from ggplotly plot?

梦想与她 提交于 2019-12-02 23:59:13
I have a plot that I am rendering in shiny using plotly and ggplot2 . However, I do not want the option bar that appears on hover to appear. Is there a way to use ggplotly(p) and remove the option bar? There is a great answer on community plotly the short version: library(plotly) set.seed(100) d <- diamonds[sample(nrow(diamonds), 1000), ] Using ggplotly : p <- ggplot(d, aes(carat, price)) + geom_point() ggplotly(p) %>% config(displayModeBar = F) If you are not using ggplotly you can do: plot_ly(d, x = carat, y = price, text = paste("Clarity: ", clarity), mode = "markers", color = carat, size =

R Shiny selectInput that is dependent on another selectInput

余生长醉 提交于 2019-12-02 22:26:00
I have some data below that I'm using to create a donut chart in R shiny, where date is a character. I want to be able to select the email whose score I want to view, but then in the second dropdown selection only see the dates for which that email has activity. For example, if I select email = xxxx in the first dropdown, I want to see only 'no activity' in the date selection field. And for email = yyyy, I want to see only 6/17/14, 6/18/14, 6/19/14 as selections. I've tried a sort of nested subsetting in the ui. Example: > ui <- shinyUI(fluidPage( + sidebarLayout( + sidebarPanel( + selectInput

dynamic body in shiny dashboard

余生长醉 提交于 2019-12-02 21:14:02
I am using R/shinydasboard to create a web app that I am putting behind a login screen. I'm having trouble with getting the main body to render based on the sidebar menu tabs. I've tried to ensure one of the tab items has selected = TRUE still to no avail. Sample code below: require(shiny) require(shinydashboard) Logged <- FALSE; LoginPass <- 0; #0: not attempted, -1: failed, 1: passed login <- box(title = "Login",textInput("userName", "Username (user)"), passwordInput("passwd", "Password (test)"), br(),actionButton("Login", "Log in")) loginfail <- box(title = "Login",textInput("userName",

R shinyDashboard customize box status color

≡放荡痞女 提交于 2019-12-02 21:07:55
I would like to customize the color of the box status of my shiny app. I find a css way to change the box background color of these box but not to customize the status color, but I do not see the equivalent argument of "status" in css? I thus print the source code of a simple page containing the considered argument "status" and I was lookin at its class (I think class="box box-solid box-primary") but I do not manage to reach it in the several .css provided in this webpage... :( Do you have an idea ? Here is this simple code : library(shiny) library(shinydashboard) ui <- dashboardPage(

Direct link to tabItem with R shiny dashboard

我的梦境 提交于 2019-12-02 20:50:39
I am using the shiny dashboard template to generate my web UI. I'd like to dynamically generate an infobox when a computation is completed with a link directed to one of the tabItems in dashboardBody . For example, I can put this in my tabItem1 output, renderInfoBox({ infoBox("Completed", a("Computation Completed", href="#tabItem2"), icon = icon("thumbs-o-up"), color = "green" ) }) But the problem is that when I click the link, it does nothing. I would like it jumps to tabItem2 . The link href seems valid when I hover on it. Thanks! Update: Other than using Javascripts, looks like using

How to Create a Choropleth or Bubble Map of UK in R [closed]

假如想象 提交于 2019-12-02 13:23:44
I have been trying to build a Choropleth / Bubble map of UK for my own shiny dashboard project. My dashboard is a student information management system and the map is supposed to show students come from which regions (zip codes or cities is also fine). Unfortunately, most packages, such as plotly and ggmap, only cover information about states of USA. So, could someone please tell me how to create a map for UK? Here is an example of what I am trying to accomplish: Choropleth Map for UK This is a step-by-step implementation of what I meant by my comment. I did not use the External Post that I

Disable browsers back button in R shiny App

戏子无情 提交于 2019-12-02 07:02:58
I am building a shiny app which has a lot of conditional panel. I have a back button in the app itself to navigate between the conditional panel. I would like to disable the web browsers back button as clicking that button goes to previous webpage(away from my app). Is there a way to do this? You can write some javascript to do this. Here I have two examples, note that I only tested this on Chrome Example 1 will return a message upon activation of the back button within the browser rm(list = ls()) library(shiny) jscode <- 'window.onbeforeunload = function() { return "Please use the button on

Shiny: calculate cumsum based on dygraphs' RangeSelector

久未见 提交于 2019-12-02 05:24:38
I'm building a shiny app where I want to plot a dataset with one of the variables being a cumulative sum of another variable. The latter needs to be re-calculated every time the start date of dygraphs ' dyRangeSelector changes. Below is a basic code without cumsum calculations. Commented out code is what I tried, with no success. library(shinydashboard) library(stringr) library(zoo) library(dplyr) library(dygraphs) ui <-dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( uiOutput("Ui1") ) ) server <- function(input, output, session) { output$Ui1 <- renderUI({ # date range

How to change the fonts size of sidebar in shinydashboard

最后都变了- 提交于 2019-12-02 04:34:29
I am new to shiny dashboard and don't familiar with CSS, can anyone tell me how to change the fonts size of sidebar in shinydashboard? Many thanks, below is my code. library('shinydashboard') library(shiny) ui <- dashboardPage( dashboardHeader(title = 'Test'), dashboardSidebar( sidebarMenu( menuItem('Tab1', tabName = '1', icon = icon('dashboard')), menuItem('Tab2', tabName = '2', icon = icon('th')) )), dashboardBody(tabItems( #First tab content tabItem(tabName = '1', fluidRow( box(plotOutput('plot1', height = 250)), box(tilte = 'Controls', sliderInput('slider', 'Number of obs', 1, 100, 50)) ))

Loading shiny module only when menu items is clicked

早过忘川 提交于 2019-12-02 04:25:33
问题 Background Within a modular 1 Shiny application, I would like to load module only when menu item on shinydashboard is clicked. If the menu item is not accessed I wouldn't like to load the module. Basic application app.R # Libs library(shiny) library(shinydashboard) # Source module source("sample_module.R") ui <- dashboardPage( dashboardHeader(title = "Dynamic sidebar"), dashboardSidebar(sidebarMenuOutput("menu")), dashboardBody(tabItems( tabItem(tabName = "tab_one", h1("Tab One")), tabItem