Skip to content

Instantly share code, notes, and snippets.

@colearendt
Created December 9, 2019 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colearendt/d16d39b310ddf7a252053ca047748775 to your computer and use it in GitHub Desktop.
Save colearendt/d16d39b310ddf7a252053ca047748775 to your computer and use it in GitHub Desktop.
blastula/gt reprex 20191209
---
output: blastula::blastula_email
---
```{r email_setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
report_url <- Sys.getenv("RSC_REPORT_URL")
```
## Test Email
```{r gt_output}
gt_data
```
This document is available at `r report_url`.
---
title: "email-reprex-20191209"
author: "Cole Arendt"
date: "12/9/2019"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(gt)
library(blastula)
```
```{r generate}
gt_data <- iris %>%
gt() %>%
tab_header(
title = md("**TEST TEST**")
) %>%
tab_spanner(
label = "Sepal",
columns = vars(Sepal.Length, Sepal.Width)
) %>%
tab_spanner(
label = "Petal",
columns = vars(Petal.Length, Petal.Width)
) %>%
tab_options(
heading.background.color = "#9fa9a3",
column_labels.background.color = "#c5d5c5",
row_group.background.color = "#e3e0cc",
table.background.color = "#f0f0f0"
)
gt_data
```
```{r email}
blastula::render_connect_email('email-20191209.Rmd') %>%
blastula::attach_connect_email(
subject = "Test Reprex"
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment