Assembles a title band and a multi-column body of section cards into a
single gtable::gtable sized for a real paper size (default A1
portrait). The spec can be an R list (built by hand, or by reading YAML
with read_poster_yaml()) or a path to a YAML file, in which case it is
read automatically.
Usage
poster(spec, objects = list(), theme = NULL, base_dir = NULL)Arguments
- spec
An R list following the schema above, or a path to a YAML file.
- objects
Named list of R objects (ggplots, data.frames, grobs) referenced from
sections[[.]]$body$objectin the spec.- theme
A
poster_theme()object. IfNULL(default), it is built fromspec$theme.- base_dir
Directory used to resolve relative image paths in the spec. Defaults to the YAML file's directory, or the working directory for a list spec.
Value
An object of class ggposter, a thin wrapper around a
gtable::gtable. Print it to preview, or pass it to
render_poster() to save a PDF/PNG at true size. To inspect the layout
with each card's content area outlined, pass show_plot_area = TRUE to
render_poster() – it's an output option, so the same poster object
renders both the normal and the outlined version.
Details
See the package vignette for the full spec schema. In short:
postersize(e.g."A1") andorientation.themeArguments passed to
poster_theme().titleArguments passed to
poster_title().layoutcolumns,left,right(or any other column names): which section names go in which column, top to bottom. Setalign_rows: trueto line up each row position across columns to the tallest"auto"-height card at that position, instead of each column stacking at its own height.sectionsNamed list; each has
header, optional relativeheight, and abodyoftype"text","table","figure", or"image"plus that type's arguments.