Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206571

How to specify menuItem in ShinyDashboard?

$
0
0

I'm creating Shiny web app using shinydashboard package version 0.7.1.

So I faced a problem that nothing happens when I specify menuItem.

Here is the example:

library(shinydashboard)
library(sqldf)
library(DBI)
library(foreign)
library(RPostgres)
library(stringr)
library(readxl)
library(ggplot2)
library(ggpubr)
library(formattable)
library(reshape2)

header <- dashboardHeader(title = "S-T")
sidebar <- dashboardSidebar(
    textInput("banc_lics", "No of license", value=1),
    dateInput("date_an", "Input date", value = "2019-02-01" ),
    sidebarMenu(
        sidebarMenu(
            menuItem("Credit Risk", tabName = "Credit Risk",  icon("abacus")),
            menuItem("Equity Risk", tabName = "Equity Risk", icon("wave-tiangle")))
        ),
    submitButton("Submit", icon("calculator"))
)

page <- dashboardBody(
    tabItems(
        tabItem(
            tabName = "Credit Risk", h1("Credit Risk"),
            fluidRow(
                box(width=12, title = "Таблица", tableOutput("data_table"))
            ),
            fluidRow(
                box(width=12, title = "График", plotOutput("data_plot"))
            ) 
        ),
        tabItem(tabName = "Equity Risk", h2("Equity Risk"))
    )
)

ui <-  dashboardPage(header, sidebar, page, skin="yellow")

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

I don't see prespecified data_table and data_plot in the Body.

Any ideas gow can I handle this problem?

Thanks.


Viewing all articles
Browse latest Browse all 206571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>