generated from inSilecoInc/workshop_R_template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_04_shiny_synthesis.Rmd
86 lines (54 loc) · 1.48 KB
/
_04_shiny_synthesis.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
---
title: "Shiny synthesis"
output:
xaringan::moon_reader:
css: [default, rd.css, rd-font.css, "hygge"]
lib_dir: assets
seal: false
nature:
highlightStyle: dracula
countIncrementalSlides: false
beforeInit: "macros.js"
---
```{r include = FALSE}
source("_setup.R")
```
class: inverse, center, middle
# `r nf()` Our Shiny V3
![:custom_hr]()
## `r ck()` ~2h
---
# Reactivity, escaping the graph
### What if you need more control on the reactivity?
--
### What if you need your own input?
--
### What if you want to specify different rules of reactivity?
--
### You simply use the building blocks, and you escape the graph!
* `observeEvent()`
* `isolate()`
---
# Data synthesis within the shiny app
The partner would like us to add an additional summary with the following statistics:
- Number of species selected
- Number of period selected
- Mean density for the periods and species selected
- A table summarizing the mean density by period (column) and species (row)
---
# Data synthesis within the shiny app
.pull-left[
***Data*** `r db()`
- We already have all the raw data that we need.
]
.pull-right[
***What to do***
- Think of which variables will be reactive and involved in each computation
- Declared the new tab in the UI
- Prepared and computed the output variable
]
`r cdw(minutes = 20, seconds = 0, margin = "1em")`
---
# Solution
![](img/app3.png)
https://github.com/inSilecoInc/cws-shiny-template/blob/practice3/practice3/app.R