Format for converting an R Markdown document to a grid oriented dashboard layout. The dashboard flexibly adapts the size of it's plots and htmlwidgets to its containing web page.
flex_dashboard(fig_width = 6, fig_height = 4.8, fig_retina = 2,
fig_mobile = TRUE, dev = "png", smart = TRUE, self_contained = TRUE,
favicon = NULL, logo = NULL, social = NULL, source_code = NULL,
navbar = NULL, orientation = c("columns", "rows"),
vertical_layout = c("fill", "scroll"), storyboard = FALSE,
theme = "default", highlight = "default", mathjax = "default",
extra_dependencies = NULL, css = NULL, includes = NULL,
lib_dir = NULL, md_extensions = NULL, pandoc_args = NULL,
devel = FALSE, ...)
Default width (in inches) for figures
Default width (in inches) for figures
Scaling to perform for retina displays (defaults to 2). Note that for flexdashboard enabling retina scaling provides for both crisper graphics on retina screens but also much higher quality auto-scaling of R graphics within flexdashboard containers.
Create an additional rendering of each R graphics figure
optimized for rendering on mobile devices oriented in portrait mode.
If TRUE
, creates a figure which is 3.75 x 4.80 inches wide;
if FALSE
, create no additional figure for mobile devices;
if a numeric vector of length 2, creates a mobile figure with the
specified width and height.
Graphics device to use for figure output (defaults to png)
Produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses.
Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of it's size).
Path to graphic to be used as a favicon for the dashboard.
Pass NULL
to use no favicon.
Path to graphic to be used as a logo for the dashboard. Pass
NULL
to not include a logo. Note
that no scaling is performed on the logo image, so it should fit exactly
within the dimensions of the navigation bar (48 pixels high for the
default "cosmo" theme, other themes may have slightly different navigation
bar heights).
Specify a character vector of social sharing services to
automatically add sharing links for them on the navbar
. Valid values
are "twitter", "facebook", "google-plus", "linkedin", and "pinterest" (more
than one service can be specified).
URL for source code of dashboard (used primarily for
publishing flexdashboard examples). Automatically creates a navbar
item which links to the source code.
Optional list of elements to be placed on the flexdashboard
navigation bar. Each element should be a list containing a title
and/or icon
field, an href
field. Optional fields target
(e.g. "_blank") and align
("left" or "right") are also supported.
Determines whether level 2 headings are treated as dashboard rows or dashboard columns.
Vertical layout behavior: "fill" to vertically resize charts so they completely fill the page; "scroll" to layout charts at their natural height, scrolling the page if necessary.
TRUE
to use a storyboard layout scheme that places
each dashboard component in a navigable storyboard frame. When a
storyboard layout is used the orientation
and vertical_layout
arguments are ignored. When creating a dashbaord with multiple pages you
should apply the `.storyboard` attribute to individual pages rather
than using the global storyboard
option.
Visual theme ("default", "bootstrap", "cerulean", "journal", "flatly", "readable", "spacelab", "united", "cosmo", "lumen", "paper", "sandstone", "simplex", or "yeti"). The "cosmo" theme is used when "default" is specified.
Syntax highlighting style. Supported styles include "default", "tango", "pygments", "kate", "monochrome", "espresso", "zenburn", and "haddock". Pass NULL to prevent syntax highlighting.
Include mathjax. The "default" option uses an https URL from a
MathJax CDN. The "local" option uses a local version of MathJax (which is
copied into the output directory). You can pass an alternate URL or pass
NULL
to exclude MathJax entirely.
Additional function arguments to pass to the
base R Markdown HTML output formatter html_document_base
One or more css files to include
Named list of additional content to include within the
document (typically created using the includes
function).
Directory to copy dependent HTML libraries (e.g. jquery,
bootstrap, etc.) into. By default this will be the name of the document with
_files
appended to it.
Markdown extensions to be added or removed from the
default definition or R Markdown. See the rmarkdown_format
for
additional details.
Additional command line options to pass to pandoc
Enable development mode (used for development of the format itself, not useful for users of the format).
Unused
See the flexdashboard website for additional documentation: http://rmarkdown.rstudio.com/flexdashboard/
# NOT RUN {
library(rmarkdown)
library(flexdashboard)
# simple invocation
render("dashboard.Rmd", flex_dashboard())
# specify the theme option
render("pres.Rmd", flex_dashboard(theme = "yeti"))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab