https://github.com/rjake/headliner
https://github.com/rjake/headliner
hacktoberfest
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rjake/headliner
- Owner: rjake
- License: other
- Created: 2020-09-05T00:26:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T03:36:20.000Z (about 2 years ago)
- Last Synced: 2024-08-13T07:11:27.071Z (6 months ago)
- Topics: hacktoberfest
- Language: R
- Homepage: https://rjake.github.io/headliner
- Size: 4.5 MB
- Stars: 44
- Watchers: 3
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.Rmd
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - rjake/headliner - (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
comment = "#>"
)
```# headliner
[](https://cran.r-project.org/package=headliner/)
[](https://cran.r-project.org/package=headliner)
[](https://app.codecov.io/gh/rjake/headliner/)
[](https://github.com/rjake/headliner/actions/)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.
## Installation
You can install the dev version of `headliner` from [github](https://github.com/rjake/headliner) with:
``` r
devtools::install_github("rjake/headliner")
```Let's look at some of the talking points for the difference between 5 and 7:
```{r}
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:
```{r}
headline(
x = 5,
y = 7,
headline = "There was {article_delta_p}% {trend} ({orig_values})"
)
```See [here](https://rjake.github.io/headliner/articles/intro.html) for a longer introduction.