-
Notifications
You must be signed in to change notification settings - Fork 10
/
dashboard_dynamic.Rmd
114 lines (71 loc) · 1.99 KB
/
dashboard_dynamic.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
title: "Burro App"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
#use rmarkdown::run() to run app
#https://somtom.github.io/post/using-dynamically-rendered-r-markdown-childs-for-reports/
#https://www.andrewheiss.com/blog/2020/01/01/flexdashboard-dynamic-data/
```
Data Overview
=======================================================================
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### Visual Summary
```{r}
```
### Tabular Summary
```{r}
```
### Data Dictionary
```{r}
```
Categorical Data
=======================================================================
Row {.tabset .tabset-fade}
-----------------------------------------------------------------------
### Single Variable
```{r}
```
### Outcome View
```{r}
```
### Tabular
```{r}
```
Continuous Data
=======================================================================
### Histogram Explorer
```{r}
```
### Boxplot Explorer
```{r}
```
### Correlation Explorer
```{r}
```
```{r render subpages, include=FALSE}
# Get all unique product groups for the subpages
product_groups <- unique(data$product_group)
# Create variable which stores all subpages outputs
out = NULL
# Set knitr options to allow duplicate labels (needed for the subpages)
options(knitr.duplicate.label = 'allow')
# Create temporary environment which we use for knitting subpages.RMD
subpage_env <- new.env()
for (pg in product_groups) {
# Filter data for product group
subpage_data <- data %>%
filter(product_group == pg)
# Assign filtered data and product group to subpage_env
assign("subpage_data", subpage_data, subpage_env)
assign("product_group", pg, subpage_env)
# Knit subpage.RMD using the subpage_env and add result to out vector
out = c(out, knitr::knit_child('subpage.RMD', envir = subpage_env))
}
```
`r paste(knitr::knit_child(text = out), collapse = '')`