5 Outputs 16
5.1 Global view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Rules to define outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.4 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.5 Plot | Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.6 Plot | App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.7 Table | Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.8 Table | App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.9 DataTable | Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.10 DataTable | App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.11 Defining UI elements in the SEVER | Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.12 Defining UI elements in the SEVER | A simple example . . . . . . . . . . . . . . . . . . . . . 19
5.13 Taking things further: building an output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6 Organizing the application 19
6.1 sidebarLayout | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6.2 sidebarLayout | Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.3 navbarPage | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.4 navbarPage | App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6.5 navbarPage | with navbarMenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.6 navbarPage | Shiny app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.7 tabsetPanel | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.8 tabsetPanel | Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.9 navlistPanel | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.10 navlistPanel | Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.11 Grid Layout | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.12 Grid Layout | Shiny app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.13 wellPanel | Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.14 wellPanel | Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.15 Combine structures | Shiny app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.16 shinydashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7 Interactive charts 24
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.2 Integration in shiny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3 Examples for server and ui functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.4 Interactive charts: example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.5 Interactive charts: example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.6 Interactive charts: example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.7 Interactive charts: example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8 Isolation 27
8.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.2 Example | ui.R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.3 Example | server.R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
8.4 Example | App . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
9 Reactive expressions 28
9.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
9.2 Without reactive expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
9.3 With a reactive expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
9.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
10 Observe & functions to update 29
2