shinydashboard

Linking notification to tab in shinydashboard

蹲街弑〆低调 提交于 2019-12-04 01:46:57
问题 I'd like to link a notificattion to an (internal) tab. To do so I came accross this: How to use href in shiny notificationItem? This seems to work right after loading of the app, but after some navigation in the sidebar the link does not work anymore. ui.R library(shiny) library(shinydashboard) notification <- notificationItem(icon = icon("exclamation-triangle"), status = "danger", paste0("noti")) notification$children[[1]] <- a(href="#shiny-tab-dashboard","data-toggle"="tab", "data-value"=

Use shiny text input and dplyr to filter rows in a dataframe

爱⌒轻易说出口 提交于 2019-12-03 21:30:17
I am trying to use the text input widget on a shiny app to filter rows in a data frame but I can’t get it working. Dataset df1<-data.frame (Name=c("Carlos","Pete","Carlos","Carlos","Carlos","Pete","Pete","Pete","Pete","Homer"),Sales=(as.integer(c("3","4","7","6","4","9","1","2","1","9")))) UI shinyUI(fluidPage( titlePanel("Sales trends"),titlePanel("People score"), sidebarLayout(sidebarPanel( textInput("text", label = h3("Text input"), value = "Enter text..."), numericInput("obs", "Number of observations to view:", 3), helpText("Note: while the data view will show only the specified", "number

Shiny dashboard, user authentication

左心房为你撑大大i 提交于 2019-12-03 21:22:26
I am trying to include a shiny dashboard inside a code snippet I found ( https://github.com/treysp/shiny_password ) that wraps a shiny app inside functions to set up user authentication. This snippets works perfectly with fluidPage() but I noticed that it is not working when I wrap a dhasboardPage(): I try to log in, type in my username and my password, click on log in and then nothing happens, I am stuck on the login page. No error message in the console I use to fire up the server by calling runApp() Do you have any idea of what might cause this particular problem? Thanks in advance Here is

reproducing shiny using flexdashboard template

扶醉桌前 提交于 2019-12-03 20:39:35
I borrowed this code below from the shinygallery and made some changes. Basically this uses fluidPage . I am interested in redoing the same thing using flexdashboard . I have gone through the flexdashboard userguide . but the descriptions on that website are in some rmarkdown or sweave format ?? which I am not familiar with. So if I can see the flexdashboard version of this example without the markdown or sweave then i can easily relate to different components and build on that. Any tips or pointers are appreciated folks. library(shiny) ui = shinyUI(fluidPage( mainPanel( tabsetPanel( tabPanel(

React to menuItem() tab selection

雨燕双飞 提交于 2019-12-03 13:08:14
In shinydashboard , one can create menuItem() s, which are tabs in the sidebar. I want to be able to poll which tab is active, by using the standard input$foo syntax. However, I was not able to do so. I tried by referencing the menuItem() 's tabName or id but that did nothing. Is there a way to do it? sidebarMenu have optional id parametr you can use it sidebarMenu(id="menu1", menuItem("PointA_",tabName = "PointA") ) On server side use input$menu1 Full working example, print PointA or PointB ( which tap active) library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader( title

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

大憨熊 提交于 2019-12-03 08:11:51
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 fact that the raster used by leaflet is projected, while the raw data I use to identify the points is Lat

dynamic body in shiny dashboard

主宰稳场 提交于 2019-12-03 07:46:34
问题 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

R shinyDashboard customize box status color

寵の児 提交于 2019-12-03 07:40:25
问题 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

Shinydashboard: Is it not possible to have nested menu sub items? Can't make it work

ε祈祈猫儿з 提交于 2019-12-03 05:58:27
I am using a shinydashboard, and have a need to build two-level nested sub menus. I am trying this and won't work: library(shinydashboard) sidebar <- dashboardSidebar( sidebarMenu(id = 'sidebarmenu', menuItem('x', tabName = 'x', icon = icon('line-chart')), menuItem('y', tabName = 'y', icon = icon('line-chart'), menuSubItem('a', tabName = 'a', icon = icon('line-chart')), menuSubItem('b', tabName = 'b', icon = icon('line-chart'), menuSubItem('l', tabName = 'l', icon = icon('line-chart')), menuSubItem('m', tabName = 'm', icon = icon('line-chart'))), menuSubItem('c', tabName = 'c', icon = icon(

How can i embed a twitter timeline in a shiny app?

梦想的初衷 提交于 2019-12-03 03:55:17
Having difficulty embedding a twitter timeline into a shiny app. tried to follow this code library(shiny) runApp(list(ui = fluidPage( tags$head(tags$script('!function(d,s,id){var js,fjs=d.getElementsByTagName(s) [0],p=/^http:/.test(d.location)?\'http\':\'https\';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");')), titlePanel(""), sidebarLayout( sidebarPanel() , mainPanel( a("Soccer", class="twitter-timeline" , href = "https://twitter.com/pssGuy/timelines