knitr::opts_chunk$set( comment = "#>" )
The goal of headliner
is to translate facts into insights. Given two values, headliner
generates building blocks for creating dynamic text. These talking points can be combined using using glue
syntax to add informative titles to plots, section headers or other text in a report.
You can install the dev version of headliner
from github with:
devtools::install_github("rjake/headliner")
Let's look at some of the talking points for the difference between 5 and 7:
library(headliner) compare_values(5, 7) |> # returns a list view_list() # show as a data frame
We can string the talking points together like this:
headline( x = 5, y = 7, headline = "There was {article_delta_p}% {trend} ({orig_values})" )
See here for a longer introduction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.