Created
May 15, 2020 22:23
-
-
Save bhive01/668abe7417ea23a014e9458edd349f5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 'Large Number of Plots Testt: `r glue::glue("blahblahblah")`' | |
author: "Test Person" | |
date: "`r format(Sys.time(), '%d %B, %Y')`" | |
output: | |
html_document: | |
keep_md: false | |
toc: true | |
toc_float: true | |
toc_depth: 4 | |
params: | |
input_data: tibble | |
--- | |
# Trial Design and Assessment | |
Need Trial Description information here | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = FALSE) | |
``` | |
```{r inputs, message=FALSE, warning=FALSE, error=FALSE, fig.retina=TRUE, fig.height=7, fig.width=8, results = 'asis'} | |
print_plots <- function(title, plot) { | |
cat(title) | |
print(plot) | |
cat(" \n\n") | |
} | |
var_level_print_function <- function(df) { | |
cat("### Trait Level Plots \n\n") | |
prepped_df <- df %>% | |
mutate(title = glue::glue("#### Version {rep} \n\n") ) | |
pwalk(list(prepped_df$title, prepped_df$plots), ~print_plots(..1, ..2)) | |
} | |
``` | |
```{r outputs, message=FALSE, warning=FALSE, error=FALSE, fig.retina=TRUE, fig.height=7, fig.width=8, results = 'asis'} | |
nested_var_data <- params$input_data | |
var_level_print_function(nested_var_data) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment