Description Usage Arguments See Also Examples
This creates a sidebar for the dashboard
1 |
... |
Items to put in the sidebar. |
sidebarWidth |
width for the sidebar. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(flightdeck)
library(htmltools)
# Set up menu for dashboard sidebar
mySidebar <- fdSidebarMenu(
fdMenuItem("Page1", icon = fdIcon("table"), pageName = 'page1'),
fdMenuItem("Page2", icon = fdIcon("bar-chart"), pageName = 'page2')
)
# Set up pages for dashboad body
myPages <- list(
fdPage(p('Page 1'), id = 'page1', display = TRUE),
fdPage(p('Page 2'), id = 'page2')
)
## Render the dashboard only in interactive R sessions
if (interactive()) {
fdBoard(
fdHeader(title = 'My Dashboard'),
fdSidebar(fdSidebarMenu(mySidebar)),
fdBody(myPages)
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.