knitr::opts_chunk$set( echo = TRUE, warning = FALSE, message = FALSE, fig.height = 8, fig.width = 8.5 )
library(tidyverse)
pwalk(d4, ~ { root <- ..1 dat <- ..3 has_subs <- ..2 cat("##", root, "\n\n") pwalk(dat, ~ { question <- ..1 plot <- ..3 if (has_subs) cat("###", question, "\n\n") print(plot) message("Printed ", root, " ", question) # to track progress when knitting cat("\n\n") }) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.