Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • loosolab/software/i2dash
1 result
Show changes
Commits on Source (2)
......@@ -3,4 +3,5 @@ r-base
r-flexdashboard
r-knitr
r-yaml
r-ymlthis
zip
\ No newline at end of file
......@@ -18,7 +18,8 @@ Imports:
yaml,
assertive.sets,
stringr,
glue
glue,
ymlthis
Suggests:
highcharter,
plotly,
......
......@@ -20,13 +20,13 @@ setMethod("assemble", "i2dashboard", function(dashboard, pages = names(dashboard
}
# Add YAML header
knitr::knit_expand(file = system.file("templates", "yaml_header.Rmd", package = "i2dash"),
delim = c("<%", "%>"),
title = dashboard@title,
author = dashboard@author,
theme = dashboard@theme,
interactive = dashboard@interactive) %>%
cat(file = tmp_document, append = FALSE, sep = "\n")
options(ymlthis.rmd_body = "")
ymlthis::yml(date = F) %>%
ymlthis::yml_title(dashboard@title) %>%
ymlthis::yml_author(dashboard@author) %>%
ymlthis::yml_output(flexdashboard::flex_dashboard(theme = dashboard@theme)) %>%
{if(dashboard@interactive) ymlthis::yml_runtime(., runtime = "shiny") else .} %>%
ymlthis::use_rmarkdown(path = tmp_document, include_body = FALSE, quiet = TRUE, open_doc = FALSE)
# Add i2dash global setup
knitr::knit_expand(file = system.file("templates", "i2dash-global-setup.Rmd", package = "i2dash"),
......@@ -67,6 +67,7 @@ setMethod("assemble", "i2dashboard", function(dashboard, pages = names(dashboard
warning(sprintf("i2dashboard dashboard does not contain a page named '%s'", pagename))
}
}
# copy tempfile to final_document
file.copy(from = tmp_document, to = file, overwrite = TRUE)
......@@ -114,4 +115,5 @@ setMethod("assemble", "i2dashboard", function(dashboard, pages = names(dashboard
sidebar = sidebar,
components = components,
date = Sys.time())
}
\ No newline at end of file
}
---
title: <% title %>
author: <% author %>
output:
flexdashboard::flex_dashboard:
theme: <% theme %>
<% if(interactive) sprintf('runtime: shiny') %>
---
<!-- This dashboard was created with the R package 'i2dash'. https://gitlab.gwdg.de/loosolab/software/i2dash -->
\ No newline at end of file