The one-line-per-slide wrapper: starts a new slide, sets its title, and
places content on it in a single call, so a deck script reads as one line
per slide. content is dispatched by type – a ggplot becomes a chart, a
data frame a table, a character vector a bulleted text box.
Arguments
- doc
A document from
report_new().- title
Slide title (typically the survey question the slide answers).
- content
A ggplot, a data frame / tibble, or a character vector.
NULL(default) adds an empty titled slide.- layout, master
Passed to
report_add_slide();NULLauto-selects.- ...
Passed on to
report_add_plot(),report_add_table()orreport_add_text()depending oncontent.
Details
Equivalent to report_add_slide() followed by the matching report_add_*()
call, but as one pipe-friendly step so calc -> plot -> add collapses onto a
single line:
report_slide("How likely to recommend?", plot_nps(nps_value)).
See also
report_section(), report_title_slide(), report_add_slide().
Other reporting:
example_report(),
list_report_templates(),
report_add_plot(),
report_add_slide(),
report_add_table(),
report_add_text(),
report_deck(),
report_layouts(),
report_new(),
report_save(),
report_section(),
report_title_slide(),
scaffold_report()
Examples
# \donttest{
doc <- report_new("pptx") %>%
report_slide("Who follows pod racing?",
plot_bars(calc_percentage(podracing_survey, demo_gender)))
class(doc)
#> [1] "rpptx"
# }
