Description Usage Arguments Examples
This function creates a dashboard.
1 |
header |
A header created by |
sidebar |
A sidebar created by |
body |
A body created by |
theme |
A string indicating theme to use for the dashboard. |
fixed |
A boolean indicating if the dashboard should use a sticky header |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | library(flightdeck)
library(htmltools)
#' Example 1: Empty Dashboard
myBoard1 <- fdBoard(
fdHeader(),
fdSidebar(),
fdBody()
)
if (interactive()){
myBoard1
}
#' Example 2: Hello World!
myBoard2 <- fdBoard(
fdHeader(title = 'My Board'),
fdSidebar(),
fdBody(
h3("Hello World!")
)
)
if (interactive()){
myBoard2
}
#' Example 3: Fixed Header. The header stays on the page as you scroll down.
myBoard3 <- fdBoard(
fdHeader(title = 'Test'),
fdSidebar(),
fdBody(div(style = 'height:900px;')),
fixed = TRUE
)
if (interactive()){
myBoard3
}
#' Example 4: Long Titles
myBoard4 <- fdBoard(
fdHeader(
title = 'This is a really really really long title',
titleWidth = 300
),
fdSidebar(sidebarWidth = 300),
fdBody()
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.