shinydashboard

Different pages in Shiny App

末鹿安然 提交于 2019-11-30 05:20:50
I want to have different pages in my shiny dashboard. First of all I created a login page to give authentication to user and admin. After that if admin login to system want to see some options that the user cannot access to them. Question: when I login as user or admin I can see the main ui.r page in the background how can I fix this problem to see only admin.R or user.R? When the user login the dashboard shows and when the admin login the dashboard and widget show. So I decided to create 4 pages in R as following: ui.R library(shiny) library(shinydashboard) shinyUI( dashboardPage(

legend labels not displaying inline when using labels and colors in leaflet map on shiny

风格不统一 提交于 2019-11-30 05:02:48
问题 When i want to use labels and colors parameters with addLegend() function inside a shinyApp the legend is displayed in staircase as you can see below. But if i render the map only with leaflet outside of the shinyApp the labels are correctly displayed inline. I have seen this post with the same issue but their is no reproductible example so i decided to post my own question. Wrong Display (shiny dashboard) Correct Display (leaflet standalone) I made a reproductible example : # ----- Load and

Adjust height of dashboardheader in shinydashboard

六月ゝ 毕业季﹏ 提交于 2019-11-29 17:52:05
I would like to know how can I adjust the height of dashboardheader in shinydashboard dashboardHeader( title = loadingLogo('http://company.fr/','logo.jpg','buffpowa.gif'), titleWidth = 600 ) I can modify the width but the logo is too large for the header. I want the header to have enough height to display the full logo. Thanks You need to set the height of the following elements: .main-header and .main-header .logo . Also please note that it only works if they are set inside tags$li within the dropdown class. Code library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader( #

Using similar UI script in R shiny under multiple subMenuItems

江枫思渺然 提交于 2019-11-29 17:40:06
the given R shiny script creates a dropdown menu in the sidebar with main and sub menu items. When you click on the first sub-item 1, you get two selectInputs in the dashboardBody. I want a functionality where I just declare these inputs once and use it multiple times in the other sub-items, just like how reactive function does.I want to do this to make the script fast and efficient. I have less knowledge of reactive functionality, please help and thanks. library(shiny) library(shinydashboard) ui <- dashboardPage( dashboardHeader(), dashboardSidebar( sidebarMenu( id = "tabs", menuItem("Charts"

Changing the font size of valueBoxes

假装没事ソ 提交于 2019-11-29 15:51:27
问题 I would like to change the font size of the value and the subtitle for valueBox es. Below is my attempt, but would be grateful of any suggestions on how to change it in a way that looks similar to the default look. Below is my reporducible example. require(shinydashboard) valueBox2 <- function (value,header_val=4, subtitle, icon = NULL, color = "aqua", width = 4, href = NULL) { shinydashboard:::validateColor(color) if (!is.null(icon)) shinydashboard:::tagAssert(icon, type = "i") boxContent <-

How to add a company Logo to ShinyDashboard header (Not mainPanel or mainHeader)

本小妞迷上赌 提交于 2019-11-29 07:51:23
I tried to refer to below answers but the logo is locate inside the main panel but not the header panel... Any solution? Adding a company Logo to ShinyDashboard header Embedding Image in Shiny App Add company logo to every page using Rstudio and knitr [duplicate] I saw that DISTRIBUTIONS OF RANDOM VARIABLES has a logo inside main panel's header but unable to work in shinyDashboard header. Below is the coding for the company logo header: headerPanel( HTML('Distributions of Random Variables v4 <a href="http://snap.uaf.edu" target="_blank"><img align="right" alt="SNAP Logo" src="./img/SNAP

R shinyBS popup window

∥☆過路亽.° 提交于 2019-11-29 05:23:09
I working on a project where I have to create a form in shiny. I currently have a datatable in the UI which has email in the form of hyperlink. Once the hyperlink is clicked the modal window opens where I have another UI which shows the various fields to be filled. I have a save button here that should update my DB in the backend once the button is clicked. The problem I am facing is that I am unable to reference each email to that particular modal window and my update query updates all the records in the DB. Is there a way to pass all the record details that has been clicked into the modal

Add text on right of shinydashboard header

六眼飞鱼酱① 提交于 2019-11-29 04:48:24
How do I add text to the right of a dashboard header sidebar icon? It seems that previous similar solutions no longer work under updates to dashboardHeader() . This is what I am trying to do in a basic shinydashboard setting: I can use the strategy from this answer to get text in the header, but it's right-justified (which I can likely fix custom css) and also feels pretty hacky. library(shiny) library(shinydashboard) ui <- dashboardPage(dashboardHeader(title = "demo", tags$li(class = "dropdown", tags$p("foo") ) ), dashboardSidebar(), dashboardBody()) server <- function(input, output) { }

How to make pdf download in shiny app response to user inputs?

雨燕双飞 提交于 2019-11-29 04:08:11
问题 I want to make the table and the barplot generated by my shiny app to be downloadable as a pdf report. I can generate the report with the selected inputs the first time I start the app on my local computer, but when I switch the inputs, it doesn't generate the reports of the new inputs on pdf. Here's my ui code require(shiny) require(shinydashboard) require(ggplot2) require(ggthemes) sample <- read.csv("new_sample2.csv", stringsAsFactors = FALSE) header <- dashboardHeader(title = "XYZ School

Different pages in Shiny App

扶醉桌前 提交于 2019-11-29 03:41:36
问题 I want to have different pages in my shiny dashboard. First of all I created a login page to give authentication to user and admin. After that if admin login to system want to see some options that the user cannot access to them. Question: when I login as user or admin I can see the main ui.r page in the background how can I fix this problem to see only admin.R or user.R? When the user login the dashboard shows and when the admin login the dashboard and widget show. So I decided to create 4