-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathindex.Rmd
91 lines (59 loc) · 3.03 KB
/
index.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
---
title: "Building Web Apps with Shiny"
output:
html_document:
fig_cap: false
toc: true
toc_float:
collapsed: false
includes:
in_header: site-header.html
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
echo = FALSE,
fig.align = "center",
out.width = "80%"
)
```
### Welcome!
This is a short course that will introduce you to Shiny.
The course is organized into four modules, which you can access with the navigation bar above.
- Module 1: Hello Shiny! - Architecture of a shiny app
- Module 2: Reactive flow - Inputs to rendering functions to outputs
- Module 3: Reactivity essentials - Diving deeper into reactive programming
- Module 4: Customizing UI - Understanding how to build a user interface
### Getting practice
This course contains practice exercises where you will have the opportunity build and modify a Shiny app yourself.
When you encounter an exercise in the modules, you will see a button that looks something like this:
:::proj
*Navigate to the project called __1-3 Fix it up__ after clicking the button below*
[<i class="fa fa-cloud"></i> Go to RStudio Cloud Workspace](https://rstudio.cloud/spaces/81721/join?access_code=I4VJaNsKfTqR3Td9hLP7E1nz8%2FtMg6Xbw9Bgqumv){.btn .test-drive}
:::
This button will link to an RStudio Cloud Workspace for this course, where I have set up a project for each of the exercises. Each of the projects contains code for you to play with, modify, and run!
```{r fig.cap = "The course workspace"}
knitr::include_graphics("images/workspace.png")
```
```{r fig.cap = "A project with the code necessary for one of the practice questions"}
knitr::include_graphics("images/cloudproject.png")
```
The last project in this workspace contains Shiny scripts with the solutions in case you get stuck.
### Running the app locally
If you don't want to work in RStudio Cloud projects, you can instead choose to run the code locally in your own RStudio IDE. To go this route, make sure you:
1. Download the file containing the data set with the link below, and save it in the RStudio Project you'll be working out of. We will use this file throughout the course.
```{r include = TRUE}
# install and load these packages
# devtools::install_github('yihui/xfun')
# embed_file() requires a few more packages
xfun::pkg_load2(c('base64enc', 'htmltools', 'mime'))
```
```{r include = TRUE}
# a embed single file
xfun::embed_file(path = "movies.RData", text = paste("Download movies.RData") )
```
2. Copy and paste the code for the each exercise, which you'll find at the end of each exercise question.
### Ready, steady, go!
Time to give this Shiny course a whirl!
### Questions?
[RStudio Community](https://community.rstudio.com/c/shiny/8) is a great place to ask any questions related to Shiny.
If you have any suggestions for improvement (bug reports, typos, something unclear that should be revised, etc.) for this particular tutorial, you can open an issue in the [tutorial repo](https://github.com/rstudio-education/shiny-course/).