Description Usage Arguments Details See Also Examples
Generate local flexdashboards for SNAP data sets from package templates.
character, the ID of the flexdashboard template. See
character, output directory for standalone html document when
character, output file name.
named list, additional parameters passed to a specific template if required. See
logical, load static files automatically. See details.
additional arguments passed to
This function creates a flexdashboard from an existing template provided by the package.
If a given template requires custom arguments to be provided, for example a location name,
these arguments can be passed as a named list to
Some templates produce static documents. Others use Shiny at runtime.
Flexdashboards with Shiny backend support automatically launch a local instance in the default web browser.
By contrast, the static document templates save the resulting standalone html document to
out_dir/<file>, defaulting to the working directory.
In this case,
load_static = TRUE will toggle on the Shiny-like automatic launch for static flexdashboards. This is off by default.
Note that static does not mean the flexdashboard html document offers no interactivity. A template may still offer the ability to switch between different graphs and tables and explore different content. However, all data is embedded in the document. This makes it useful as a standalone file requiring no Shiny server backend, but it also means that more complex static templates result in larger output file sizes and they cannot achieve anywhere near the complexity of a flexdashboard that uses Shiny.
Additional arguments passed to
flex_dashboard typically include
Unless a given template supports it specifically, using
storyboard = TRUE will not add any meaningful content.
theme is limited to those available in the
Additional CSS can be attached with
css. Styling contained in a CSS file may be attached remotely via CDN (Content Delivery Network).
1 2 3 4 5 6 7 8 9 10
## Not run: flex_params("rsds1") pars <- list(location = "Vancouver") flex("rsds1", template_params = pars) flex("rsds1", template_params = pars, theme = "sandstone", storyboard = TRUE) pars$gfont <- "Source Sans Pro" pars$snaptheme <- "theme_snap" flex("rsds1", template_params = pars) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.