assemble: Generate an RMarkdown file from an i2dashboard object.

assembleR Documentation

Generate an RMarkdown file from an i2dashboard object.

Description

Generate an RMarkdown file from an i2dashboard object.

Usage

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


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


i2dash documentation built on Sept. 8, 2023, 6:04 p.m.