ld_bundle_doc | R Documentation |
A page bundle encapsulates the computational components, R Markdown header, and listdown object. Together, these three objects are sufficient to create a document, which can be written with the 'ld_create_document()' function.
ld_bundle_doc(cc, header, ld)
cc |
the computational component list that will be presented. |
header |
a 'list' with the header information for the document. |
ld |
a 'listdown' object describing how to present the computational components. |
An S3 object of type 'ld_page_bundle'.
cc the computational components associated with the document.
ld the 'listdown' object assoiated with the document.
header the 'listdown_header' object associated with the document.
cc_in_memory a logical value indicating if the computational components are currently stored in memory. If TRUE, then they will be written to the disk upon creation of the document. Otherwise, the 'load_cc_expr' in the 'ld' element should have the expression to load the components.
ld_create_document
listdown
library(ggplot2)
cc <- list(
iris = iris,
Sepal.Length = list(
Sepal.Width = ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(),
Petal.Length = ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width)) +
geom_point(),
Colored = list(
Sepal.Width = ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width,
color = Species)) + geom_point(),
Petal.Length = ggplot(iris, aes(x = Sepal.Length, y = Petal.Length,
color = Species)) + geom_point())))
header <- ld_rmarkdown_header("Test header", author = "Some Dude",
date = "2020")
ld <- listdown(package = "ggplot2")
ld_bundle_doc(cc, header, ld)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.