NavlistPanel application

Here, we will be creating an application using the navlistPanel application. This is a similar application including the content from the ggplot2 movies dataset. Here however, tabPanels is selected from a menu on the side, where we see the controls and a port with the output on the tab panel. You define the application in server.r the file.

The first tab (Budgets over time) will lead you to the graph with the year, title, and genre:

Budget over time using navlistPanel

The second tab (Movie picker) will lead you to the movie selector, as shown in the following screenshot:

Movie picker using navlistPanel

From the following code snippet, unlike navbar, navlistPanel is added to a page set up with fluidPage(). Here, we have a title and an ID so the currently selected tab can be accessed using input$id, which in this case is input$navlist.

Having set up the list, add tab panels, each one with a title and a value, which can be accessed using input$navlist, as seen in the following code snippet:

fluidPage(

navlistPanel(
"Movies explorer", id = "navList",

tabPanel(
"Budgets over time", value = "graph",
sliderInput("year", "Year", min = 1893, max = 2005,
value = c(1945, 2005), sep = ""),
textInput("title", "Title"),
selectInput("genre", "Which genre?",
c("Action", "Animation", "Comedy", "Drama",
"Documentary", "Romance", "Short")),
plotOutput("budgetYear", height = "300px")),
tabPanel("Movie picker", value = "table",
tableOutput("moviePicker"),
uiOutput("listMovies"))
)
)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset