assemble: Generate an RMarkdown file from an i2dashboard object.

Description Usage Arguments Value Examples

Description

Generate an RMarkdown file from an i2dashboard object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
assemble(dashboard, ...)

## S4 method for signature 'i2dashboard'
assemble(
  dashboard,
  file,
  pages = names(dashboard@pages),
  exclude = NULL,
  render = FALSE,
  ...
)

Arguments

dashboard

A i2dashboard.

...

Additional arguments passed on to 'rmarkdown::render()'.

file

The path and filename of the resulting Rmd file (recommend that the suffix should be '.Rmd').

pages

A string or vector with the names of pages, which should be assembled into the resulting Rmd file

exclude

A string or vector with the names of pages, which should be excluded from dashboard assembly.

render

A logical indicating whether the assembled dashboard should immediately be rendered with 'rmarkdown::render()' or run with 'rmarkdown::run()'.

Value

Invisibly returns the unmodified i2dashboard object.

Examples

1
2
3
4
5
i2dashboard() %>% assemble(file="MyDashboard.Rmd")
i2dashboard() %>%
    add_page("p1", "Title 1") %>%
    add_page("p2", "Title 2") %>%
    assemble(file="MyDashboard.Rmd", exclude="default", render=TRUE)

loosolab/i2dash documentation built on April 8, 2021, 12:41 a.m.