Learn R Programming

listdown (version 0.5.7)

ld_bundle_doc: Create a `listdown` Document Bundle

Description

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.

Usage

ld_bundle_doc(cc, header, ld)

Value

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.

Arguments

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.

See Also

ld_create_document

listdown

Examples

Run this code
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)

Run the code above in your browser using DataLab